read excel .xlsx file data ...

Just starting out? Need help? Post your questions and find answers here.
al2791
User
User
Posts: 20
Joined: Mon Oct 23, 2017 7:28 am

Re: read excel .xlsx file data ...

Post by al2791 »

It's OK
Thank you very much
morosh
Enthusiast
Enthusiast
Posts: 329
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Re: read excel .xlsx file data ...

Post by morosh »

In the example posted by al2791: https://wetransfer.com/downloads/f09b04 ... e=sendgrid, line 5 is empty. It seems that it isn't taken into account, as requesting display of line 5, result in line 6. So line 5 is interpreted as the 5th non empty line.
Thanks anyway!
PureBasic: Surprisingly simple, diabolically powerful
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: read excel .xlsx file data ...

Post by HeX0R »

You are right, should be fixed now.
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 670
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: read excel .xlsx file data ...

Post by Kurzer »

Hi HexOR,

thank you very much for your Excel module.
Good that I was looking for something like that after all, because I was just about to write something of my own to be able to read in Excel tables with PB.
Pew, then I don't need to reverse engineer the XLSX format further ;-)
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: read excel .xlsx file data ...

Post by HeX0R »

Yeah, I'm pretty sure, whoever "developed" that format must have had some serious brain damage :mrgreen:
loulou2522
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Oct 14, 2014 12:09 pm

Re: read excel .xlsx file data ...

Post by loulou2522 »

Kurzer wrote: Thu Aug 31, 2023 8:03 pm Hi HexOR,

thank you very much for your Excel module.
Good that I was looking for something like that after all, because I was just about to write something of my own to be able to read in Excel tables with PB.
Pew, then I don't need to reverse engineer the XLSX format further ;-)
HI,
with comate plus you can do what you want with execle amd more simply. see examples on comateplus
infratec
Always Here
Always Here
Posts: 7582
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: read excel .xlsx file data ...

Post by infratec »

Yes, but ...

not in Linux and not in macOS.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: read excel .xlsx file data ...

Post by Little John »

infratec wrote: Sat Sep 02, 2023 1:15 pm Yes, but ...

not in Linux and not in macOS.
And even on Windows you can open/edit Excel files with COMatePLUS only if Excel is installed on the same computer, no?
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 670
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: read excel .xlsx file data ...

Post by Kurzer »

HeX0R wrote: Sat Sep 02, 2023 10:34 am Yeah, I'm pretty sure, whoever "developed" that format must have had some serious brain damage :mrgreen:
:lol: Yes, especially because of the "shared strings technology".
Little John wrote:And even on Windows you can open/edit Excel files with COMatePLUS only if Excel is installed on the same computer, no?
If Excel has to be installed, that would be an exclusion criterion for COMatePlus. I also just want to read a few rows from a spreadsheet. HexOR's include file probably has less overhead.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Re: read excel .xlsx file data ...

Post by doctorized »

Tested HeX0R's code and work just fine. Is there a way to read xls files too?
User avatar
mk-soft
Always Here
Always Here
Posts: 6205
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: read excel .xlsx file data ...

Post by mk-soft »

Is a different format.
Try with ODBC driver
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Re: read excel .xlsx file data ...

Post by doctorized »

mk-soft wrote: Mon Jan 22, 2024 11:59 pm Is a different format.
Try with ODBC driver
Is there any example?
ebs
Enthusiast
Enthusiast
Posts: 557
Joined: Fri Apr 25, 2003 11:08 pm

Re: read excel .xlsx file data ...

Post by ebs »

Hello HeX0R!

I have an XLSX spreadsheet that causes your code to get stuck in a loop.

Would you be willing to look at this spreadsheet to try to figure out what's going on?
If so, I will send you a PM with a link to download it.

Thank you,
Eric
loulou2522
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Oct 14, 2014 12:09 pm

Re: read excel .xlsx file data ...

Post by loulou2522 »

I'm very surprised that no one has mentioned comate, because with this module it's even possible to emulate visual basic quite simply and thus control an excel file.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: read excel .xlsx file data ...

Post by Little John »

loulou2522 wrote: Tue Jan 23, 2024 4:46 pm I'm very surprised that no one has mentioned comate
:?:

Please read this thread once again.
Post Reply