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
Recent
Single / Double / Float s...
by
srvaldez
[
Today
at 01:50:56 am]
Commerce website written ...
by
Joanna
[
Today
at 01:27:08 am]
Hashing pointers by using...
by
440bx
[
Today
at 01:15:38 am]
FPC 3.2.4-rc1 available
by
dsiders
[
Today
at 12:59:46 am]
exception external SIGSEG...
by
billjtx
[
Today
at 12:55:00 am]
Introducing PasBuild 1.0....
by
dbannon
[December 11, 2025, 11:54:37 pm]
[SOLVED] Program compiles...
by
Schmitty2005
[December 11, 2025, 07:35:39 pm]
TIBDataSet "Closing"? on ...
by
RedOctober
[December 11, 2025, 05:00:04 pm]
So many "newbies"
by
gidesa
[December 11, 2025, 04:18:38 pm]
How can I make a safe app...
by
LeP
[December 11, 2025, 03:30:34 pm]
Lazreport. Multiple print...
by
paweld
[December 11, 2025, 03:12:47 pm]
[SOLVED] Need help conver...
by
srvaldez
[December 11, 2025, 01:52:33 pm]
SpkToolbar custom update
by
wp
[December 11, 2025, 01:48:16 pm]
OS/2 Warp 4 problem with ...
by
Thaddy
[December 11, 2025, 01:35:10 pm]
Is FPGUI still active?
by
BSaidus
[December 11, 2025, 01:25:31 pm]
Bitmap into Paintbox
by
BubikolRamios
[December 11, 2025, 12:58:20 pm]
Notetask 1.1.0 - Free cro...
by
AlexanderT
[December 11, 2025, 12:11:14 pm]
Matching video to form
by
Pe3s
[December 11, 2025, 10:56:47 am]
Is Lazarus' Tool Palette ...
by
Ed78z
[December 11, 2025, 10:37:03 am]
[SOLVED] RXSwitch
by
Petrus Vorster
[December 11, 2025, 10:35:00 am]
fpsockets error: 10047
by
rvk
[December 11, 2025, 09:50:08 am]
Has anyone installed TeeB...
by
egsuh
[December 11, 2025, 09:10:09 am]
Military Grade Directives
by
Thaddy
[December 11, 2025, 08:56:12 am]
Permutation of rows and c...
by
Zvoni
[December 11, 2025, 08:33:20 am]
Jacks or Better card game...
by
TBMan
[December 11, 2025, 03:12:03 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] - Problem saving a grid as Excel Format (Read 1896 times)
zxandris
Full Member
Posts: 170
[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: 13268
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: 170
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: 13268
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: 170
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: 13268
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: 170
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