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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
macro for code ?
by
Thaddy
[
Today
at 09:07:02 am]
[SOLVED] WebP images and ...
by
domasz
[
Today
at 08:32:54 am]
Boolean type
by
Joanna from IRC
[
Today
at 08:14:52 am]
Create DB
by
comdora
[
Today
at 07:37:05 am]
Newbie in Web Programming...
by
incendio
[
Today
at 04:02:38 am]
Named range
by
backprop
[
Today
at 03:09:07 am]
FPC Deluxe doesn't work
by
TRon
[
Today
at 02:06:21 am]
Knob Finger Spinner Graph...
by
SandyG
[
Today
at 12:40:58 am]
Using a custom record as ...
by
ilowry
[April 21, 2025, 09:13:00 pm]
Testing with SQLite3DataS...
by
dseligo
[April 21, 2025, 08:59:22 pm]
Best way to exchange data...
by
Hansvb
[April 21, 2025, 08:36:43 pm]
BGRA Shader Sphere Map
by
d2010
[April 21, 2025, 06:27:14 pm]
MVP made easier.
by
cdbc
[April 21, 2025, 05:38:10 pm]
Reading data files that a...
by
OC DelGuy
[April 21, 2025, 05:12:29 pm]
ToDoList package, support...
by
cdbc
[April 21, 2025, 04:46:00 pm]
macOS 15.4 Breaks All Com...
by
moinsen
[April 21, 2025, 04:16:24 pm]
Cannot execute Lazarus ID...
by
robert rozee
[April 21, 2025, 03:26:10 pm]
Recamán's Sequence Curve ...
by
TRon
[April 21, 2025, 03:05:03 pm]
HTMLViewer JavaScript dem...
by
myisjwj
[April 21, 2025, 02:22:46 pm]
How to DIY a filerec reco...
by
TYDQ
[April 21, 2025, 10:58:11 am]
Error: Illegal parameter:...
by
daniel_sap
[April 21, 2025, 06:45:47 am]
Times Tables Curves: Some...
by
Boleeman
[April 21, 2025, 04:45:52 am]
accessing array members i...
by
TRon
[April 21, 2025, 01:01:35 am]
RGB Plasma
by
Gigatron
[April 20, 2025, 11:26:28 pm]
Lectura puerto serie
by
Edson
[April 20, 2025, 07:42:47 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] - Problem saving a grid as Excel Format (Read 1479 times)
zxandris
Full Member
Posts: 152
[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: 12757
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: 152
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: 12757
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: 152
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: 12757
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: 152
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