Excel files?

Windows specific forum
Kaiser
Enthusiast
Enthusiast
Posts: 118
Joined: Tue Jan 11, 2005 8:36 am

Excel files?

Post by Kaiser »

Been wondering, any of you here have tried to open excel XLS files? any format of them (I know they may have changed with 2k or XP) as I need to open them and at least get the value of some cells, is that possible, to open and read XLS files?

Thanks in advance :)
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Excel files?

Post by zikitrake »

Kaiser wrote:Been wondering, any of you here have tried to open excel XLS files? any format of them (I know they may have changed with 2k or XP) as I need to open them and at least get the value of some cells, is that possible, to open and read XLS files?

Thanks in advance :)
Try this viewtopic.php?t=14864
PB 6.21 beta, PureVision User
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

There is some great powerbasic code for Excel files : http://www.powerbasic.com/files/pub/pbw ... API_PB.zip
Maybe one of the experts around could translate it ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Kaiser
Enthusiast
Enthusiast
Posts: 118
Joined: Tue Jan 11, 2005 8:36 am

Post by Kaiser »

Oooohhh those two links look quite useful! thanks! :D I'm gonna check them out and ask here if anything for not making another thread ^^
User avatar
jqn
User
User
Posts: 97
Joined: Fri Oct 31, 2003 3:04 pm

Post by jqn »

Hi,
I'm working on this problem, my solution creates a BIFF2 file, but it needs double float numbers (see http://www.purearea.net/ and download "F64" librarys).

My program (TOXCEL) reads an ASCII file (called "TOX" file), and creates a XLS file. Download it at:

http://www.tcseries.com/FTP/TOXCEL.ZIP

I've included a test file (PRUEBA.TOX) and F64 librarys needed.

Enjoy
JOAQUIN
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

Congratulations! this is very useful. Really esteem this lib :D


Y a la española :lol: : ¡Felicides! esto es muy útil!. Realmente aprecio esta librería
PB 6.21 beta, PureVision User
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

UBA UBA!

Nice one !
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Here is a HotBasic example : http://www.angelfire.com/space/netcensus/hot/hotxls.zip (include file with many functions).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

Kaiser or others, do you know how can I set Autofit propierty for all columns???.

Thank you for this lib!
PB 6.21 beta, PureVision User
User avatar
jqn
User
User
Posts: 97
Joined: Fri Oct 31, 2003 3:04 pm

Post by jqn »

ALL about EXCEL formats in:

http://sc.openoffice.org/excelfileformat.pdf

JOAQUIN
Bernard
User
User
Posts: 23
Joined: Sun Apr 27, 2003 4:49 pm
Location: France

Post by Bernard »

I search how I can open an existing file and read it whitout use ODBC
Is it possible JOAQUIN ?

Bernard
Bernard
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Yes but it's difficult, here is a small example which obtains a few items from the xls file.
It was a rewrite from some example i found.
It does not much but you'll need to read the PDF's toroughly before you can modify this example.

The example was written in PowerBASIC:

http://www.powerbasic.com/support/forum ... 01984.html
User avatar
jqn
User
User
Posts: 97
Joined: Fri Oct 31, 2003 3:04 pm

Post by jqn »

2Bernard
Yes, I'ts very difficult, I think.

I do not know how to do it, but I have found a library in HotBasic, who reads a BIFF8 file (Author says)

Download HotXLS from
www.angelfire.com/space/netcensus/hotbasic.html

If you could translate it to PB I will be eternally gratefull.

JOAQUIN
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

It seems it interprets the file 100%, the istorage part i showed you is imo safer.
The actuall record reading could be equal to the HB example though.
I have not invested this much, i find the code ackward, but maybe it isn't.
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

Kaiser or others, do you know how can I set Autofit propierty for all columns???.
Disculpen.. (excuse me) I would also like to know how to auto-fit columns..!
Been needing that for a long while (although its not important.. but its nice to have).

Cheers
Post Reply