libxlsxwriter -> XlsxReader ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: libxlsxwriter -> XlsxReader ?

Post by AUGE_OHR »

fouednoomen wrote: Wed May 27, 2020 3:15 pm we need CStruct.ch
here it is
CStruct.zip
(2.27 KiB) Downloaded 161 times
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: libxlsxwriter -> XlsxReader ?

Post by AUGE_OHR »

jparada wrote: Wed May 27, 2020 2:28 pm so I am using the Riztan wrapper, please take a look at https://github.com/riztan/hbxlsxwriter
i ZIP of your Link i found "C" Source. is it to build DLL :?:

i have look into hbxlsxwriter.hbp

Code: Select all

/libxlsxwriter/include 

#-iflag={bcc}-a 
i have no Folder /libxlsxwriter/include
can those File from c:\MiniGUI\SAMPLES\Advanced\HbXlsxWriter\xlsxwriter\*.h be used :?:

i guess BCC is used so it is for MiniGUI Extended Version.

how to re-write hbxlsxwriter.hbp for HMG using MinGW :idea:

Code: Select all

-hblib
-inc

-o${hb_name}

-w3 -es2

-depkeyhead=xlsxwriter:xlsxwriter.h
-depcontrol=xlsxwriter:no{HB_BUILD_3RDEXT='no'}
-depcontrol=xlsxwriter:${HB_WITH_XLSXWRITER}
-depincpath=xlsxwriter:${HOME}/libxlsxwriter/include
-depincpath=xlsxwriter:/usr/include
-depincpath=xlsxwriter:/libxlsxwriter/include
-depfinish=xlsxwriter

#-iflag={bcc}-a

${hb_name}.hbx

#app.c
workbook.c
worksheet.c
format.c
chart.c
chartsheet.c
content_types.c
core.c
custom.c 
drawing.c
relationships.c
shared_strings.c
styles.c
utility.c
hb_misc.c

hb_others.prg
 
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: libxlsxwriter -> XlsxReader ?

Post by AUGE_OHR »

hi,

my Question was how to READ a XLSx into Array to display it with GRID.
i guess it must be possible when WRITE a XLSx using XlsWriter.
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: libxlsxwriter -> XlsxReader ?

Post by AUGE_OHR »

have found this

https://libxlsxwriter.github.io/introduction.html
It can only create new files. It cannot read or modify existing files.
so i need other Solution to READ a XLSx File
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: libxlsxwriter -> XlsxReader ?

Post by danielmaximiliano »

AUGE_OHR wrote: Fri May 29, 2020 9:28 pm have found this

https://libxlsxwriter.github.io/introduction.html
It can only create new files. It cannot read or modify existing files.
so i need other Solution to READ a XLSx File
try opensource https://sourceforge.net/projects/xlsxio/
Read / Write Xlsx , include DLL and .a library

Code: Select all

//open .xlsx file for reading
xlsxioreader xlsxioread;
if ((xlsxioread = xlsxioread_open(filename)) == NULL) {
  fprintf(stderr, "Error opening .xlsx file\n");
  return 1;
}

//list available sheets
xlsxioreadersheetlist sheetlist;
const char* sheetname;
printf("Available sheets:\n");
if ((sheetlist = xlsxioread_sheetlist_open(xlsxioread)) != NULL) {
  while ((sheetname = xlsxioread_sheetlist_next(sheetlist)) != NULL) {
    printf(" - %s\n", sheetname);
  }
  xlsxioread_sheetlist_close(sheetlist);
}

//read values from first sheet
char* value;
printf("Contents of first sheet:\n");
xlsxioreadersheet sheet = xlsxioread_sheet_open(xlsxioread, NULL, XLSXIOREAD_SKIP_EMPTY_ROWS);
while (xlsxioread_sheet_next_row(sheet)) {
  while ((value = xlsxioread_sheet_next_cell(sheet)) != NULL) {
    printf("%s\t", value);
    free(value);
  }
  printf("\n");
}
xlsxioread_sheet_close(sheet);

//clean up
xlsxioread_close(xlsxioread);
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: libxlsxwriter -> XlsxReader ?

Post by AUGE_OHR »

hi,
danielmaximiliano wrote: Sat May 30, 2020 12:38 am try opensource https://sourceforge.net/projects/xlsxio/
Read / Write Xlsx , include DLL and .a library
thx for Code, i will look at it
have fun
Jimmy
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: libxlsxwriter -> XlsxReader ?

Post by Rathinagiri »

Yes. It looks nice since it doesn't require Excel to be installed.

We need some Harbour bridge for the library. I think @Auge_Ohr can do this.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
nekbmm
Posts: 118
Joined: Sat Jul 16, 2016 3:16 am
DBs Used: DBF,SQLite
Location: Ivanjica, Serbia

Re: libxlsxwriter -> XlsxReader ?

Post by nekbmm »

.AND. | .OR. read data from file. ('SELECT * FROM [sheetName$])

+1
Post Reply