Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
FPSpreadsheet
»
[Solved] - Problem saving a grid as Excel Format
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
WIKI Timeout issues
Please read here if you have trouble connecting to the wiki
Recent
Fpcupdeluxe
by
DonAlfredo
[
Today
at 09:53:14 am]
new private messages fly ...
by
dseligo
[
Today
at 09:46:52 am]
[SOLVED] SQLite query to ...
by
Zvoni
[
Today
at 09:30:48 am]
Sharing utilities
by
lucabertoncini
[
Today
at 09:01:00 am]
Call anchor editor for a ...
by
CM630
[
Today
at 08:27:14 am]
Triple Gosper Space Filli...
by
Thaddy
[
Today
at 07:17:33 am]
Program vs Simple Program...
by
ASBzone
[
Today
at 06:43:56 am]
how to create different c...
by
ALLIGATOR
[
Today
at 06:22:48 am]
Is Lazarus still serious ...
by
dbannon
[
Today
at 06:09:15 am]
replace the Executable St...
by
paule32
[
Today
at 04:25:38 am]
outsource RTTI
by
paule32
[
Today
at 04:22:43 am]
"Mario & Luigi" (1994-200...
by
paule32
[
Today
at 03:40:18 am]
Lazarus Tool for creating...
by
JuhaManninen
[
Today
at 12:39:37 am]
How to control subform: S...
by
madref
[July 13, 2025, 11:35:23 pm]
Building warnings ?
by
madref
[July 13, 2025, 11:26:32 pm]
Need help testing demonst...
by
Gustavo 'Gus' Carreno
[July 13, 2025, 10:41:44 pm]
trunc builtin function is...
by
jamie
[July 13, 2025, 10:01:41 pm]
LMath and Components 0.6....
by
cdbc
[July 13, 2025, 08:36:57 pm]
Circumvent the assignment...
by
Thaddy
[July 13, 2025, 08:31:45 pm]
activex.pp DosDateTimeToV...
by
nanobit
[July 13, 2025, 08:23:05 pm]
Searching for current wor...
by
PascalDragon
[July 13, 2025, 07:13:06 pm]
Compare two text lines an...
by
avk
[July 13, 2025, 05:38:26 pm]
ChatGPT and ObjectPascal ...
by
Joanna
[July 13, 2025, 04:17:12 pm]
Bright Colored Fans and C...
by
Boleeman
[July 13, 2025, 02:54:58 pm]
Fragmented Window Grid Pa...
by
Boleeman
[July 13, 2025, 02:47:37 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] - Problem saving a grid as Excel Format (Read 1671 times)
zxandris
Full Member
Posts: 157
[Solved] - Problem saving a grid as Excel Format
«
on:
August 03, 2024, 06:47:33 pm »
I am pretty sure I'm missing something obvious but I've got a grid which is built from a simple csv (Which I had to load myself) and I want to save it in Excel Format, or another in time.
Code: Pascal
[Select]
[+]
[-]
wsSheet
.
SaveToSpreadsheetFile
(
dlgExport
.
filename
,
sfExcel8
,
true
)
;
That's the code I'm using and I have
Code: Pascal
[Select]
[+]
[-]
fpspreadsheetgrid
,
fpspreadsheetctrls
,
fpsTypes
,
in the uses clause for the unit/form. Can anyone tell me what I'm doing wrong here please?
CJ
«
Last Edit: August 04, 2024, 08:22:05 am by zxandris
»
Logged
wp
Hero Member
Posts: 12909
Re: Problem saving a grid as Excel Format
«
Reply #1 on:
August 03, 2024, 10:22:06 pm »
What is the error? What type is wsSheet?
Logged
zxandris
Full Member
Posts: 157
Re: Problem saving a grid as Excel Format
«
Reply #2 on:
August 03, 2024, 10:23:59 pm »
Tried to write a spreadsheet using an unsupported format and wsSheet is a simple tsWorksheetGrid.
Logged
wp
Hero Member
Posts: 12909
Re: Problem saving a grid as Excel Format
«
Reply #3 on:
August 04, 2024, 08:11:21 am »
Did you add unit xlsBiff8 to "uses"? FPSpreadsheet has a modular structure, and for every file format the reader/writer unit must be listed, or you add "fpsAllFormats" to register all file formats.
Logged
zxandris
Full Member
Posts: 157
Re: Problem saving a grid as Excel Format
«
Reply #4 on:
August 04, 2024, 08:13:46 am »
Thank you very much that appears to have worked. It does actually say as a hint it's not used in the unit, but it makes it work anyway!
Logged
wp
Hero Member
Posts: 12909
Re: Problem saving a grid as Excel Format
«
Reply #5 on:
August 04, 2024, 08:18:03 am »
Yes, that's because your code does not explicitly call any reader/writer function (this is done internally). If you'd once decide to remove "unused units" be careful to keep your reader/writer unit.
Logged
zxandris
Full Member
Posts: 157
Re: Problem saving a grid as Excel Format
«
Reply #6 on:
August 04, 2024, 08:21:50 am »
Thanks for the tip!
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
FPSpreadsheet
»
[Solved] - Problem saving a grid as Excel Format
TinyPortal
© 2005-2018