Page 1 of 1

Excel files?

Posted: Tue May 31, 2005 6:32 am
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 :)

Re: Excel files?

Posted: Tue May 31, 2005 7:10 am
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

Posted: Tue May 31, 2005 8:27 am
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 ?

Posted: Tue May 31, 2005 2:31 pm
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 ^^

Posted: Tue May 31, 2005 4:37 pm
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

Posted: Tue May 31, 2005 8:18 pm
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

Posted: Tue May 31, 2005 8:21 pm
by Num3
UBA UBA!

Nice one !

Posted: Wed Jun 08, 2005 4:18 pm
by gnozal
Here is a HotBasic example : http://www.angelfire.com/space/netcensus/hot/hotxls.zip (include file with many functions).

Posted: Fri Jun 10, 2005 5:48 am
by zikitrake
Kaiser or others, do you know how can I set Autofit propierty for all columns???.

Thank you for this lib!

Posted: Fri Jun 10, 2005 8:23 am
by jqn
ALL about EXCEL formats in:

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

JOAQUIN

Posted: Sun Jun 12, 2005 7:35 am
by Bernard
I search how I can open an existing file and read it whitout use ODBC
Is it possible JOAQUIN ?

Bernard

Posted: Sun Jun 12, 2005 8:39 am
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

Posted: Mon Jun 13, 2005 12:29 pm
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

Posted: Mon Jun 13, 2005 2:49 pm
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.

Posted: Mon Jun 13, 2005 8:27 pm
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