Recent

Author Topic: Excel  (Read 9288 times)

mizarra

  • Newbie
  • Posts: 5
Excel
« on: May 18, 2005, 10:21:35 pm »
Anybody know if exist a package that can read and write a xls file?[/b]. Thank

Anonymous

  • Guest
RE: Excel
« Reply #1 on: September 05, 2005, 09:19:02 pm »
The ole automation not supported in Free Pascal yet.. :(
Try write a little dll in C or Delphi.

Pavel

  • Guest
Re: Excel
« Reply #2 on: September 23, 2005, 02:29:56 pm »
Quote from: "mizarra"
Anybody know if exist a package that can read and write a xls file?[/b]. Thank


You can try freeexcelsylk unit for delphi. : http://freeware.brothersoft.com/software_developer/delphi/freeexcelsylk_download_22614.html This unit export your data to excel without excel. But cannot read excel files. :(

melone

  • Newbie
  • Posts: 6
Excel
« Reply #3 on: October 23, 2006, 09:07:07 pm »
trying to export a dbgrid to an excel file, ive tried the unit u kindly linked.
any of you tried to compile it?
i am a bit noob, this is what i encountered..

  FFileStream.WriteBuffer(Pointer(Value)^,Length(Value));
illegal type conversion: ShortString to ^untyped

  FFileStream.Write(PChar(Value)^, length(Value));
illegal type conversion: ShortString to ^Char

i used:
FreeExcelSylk_1.13beta.zip

i mirrored it atm here:
http://www.gbadat.altervista.org/FreeExcelSylk_1.13beta.zip
(if link doesnt work, copy it to address bar)

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Excel
« Reply #4 on: October 24, 2006, 11:41:44 am »
try to use WriteBuffer(Value[1], Lenght(Value))

Don't know if ir work with shortstrings, but it does with ansi strings (wiich is btw, advisable to use)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Excel
« Reply #5 on: October 24, 2006, 02:13:33 pm »
If you use a component written for Delphi, compile with the -Sd compiler option (or add {$mode delphi} to all sources) to make sure are strings are actually ansistrings.

melone

  • Newbie
  • Posts: 6
Excel
« Reply #6 on: October 25, 2006, 08:24:09 pm »
{$mode delphi}  worked!!!!!!  :P  :P
big big thanks and sorry for the stupid question  :wink:

 

TinyPortal © 2005-2018