Page 7 of 9

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Fri Nov 30, 2018 7:45 pm
by Mario Mansilla
Hola Amigos :
colocando la comilla simple delante del valor funciono perfecto .
Muchas gracias
Saludos
Mario Mansilla

Hello friends :
placing the single quote in front of the value worked perfectly.
Thank you
regards
Mario Mansilla

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Mon May 11, 2020 8:40 am
by SALINETAS24
Mario Mansilla wrote: Fri Nov 30, 2018 7:45 pm Hola Amigos :
colocando la comilla simple delante del valor funciono perfecto .
Muchas gracias
Saludos
Mario Mansilla

Hello friends :
placing the single quote in front of the value worked perfectly.
Thank you
regards
Mario Mansilla
Hola Mario, me puede indicar donde tengo que poner la "comilla" y que tipo de comilla tengo que poner.
Tengo el mismo problema.
Gracais

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Mon May 11, 2020 8:42 am
by SALINETAS24
Yeeep .., ya lo tengo

oSheet:Cells(nLinea,4):Value := "'"+aTemp[4]

Gracias

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Mon Sep 30, 2024 6:22 pm
by mol
Hello my friends!
I want to refresh this topic because I want to find a possibility to create OpenOffice spreadsheet without using OLE.
It should work too much quicker than writing data cell by cell or even by PASTE data from clipboard.
It would avoid program from OLE errors.
It's important for me because sometimes I need to create file with many sheets and a lot of data.
Harbour contains hbxslxml library, some test are located in extras\hbxlsxml\tests, but I don't have a time to study it.
I need quick solution almost for now

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Tue Oct 01, 2024 10:26 pm
by edk
Marku mam zrobione na hblibxlsxwriter prostą konwersję z DBFów do xlsx. Zmodyfikowałem o możliwość dodawania arkuszy do skoroszytu. Przykład wraz z wymaganymi bibliotekami (.a i .dll) oraz definicjami (.ch) jest w załączniku.

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Wed Oct 02, 2024 4:29 am
by Rathinagiri
If you just want to create a data export with multiple sheets, then this is a quick way to do in Harbour! Just use this xml code and save as .xml file. You can open in Excel with multiple sheets automatically! :)

Code: Select all

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:o="urn:schemas-microsoft-com:office:office"
 xmlns:x="urn:schemas-microsoft-com:office:excel"
 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:html="http://www.w3.org/TR/REC-html40">
 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <ActiveSheet>2</ActiveSheet>
 </ExcelWorkbook>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
 </Styles>
 <Worksheet ss:Name="Sheet1">
  <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="1" x:FullColumns="1"
   x:FullRows="1" ss:DefaultRowHeight="15">
   <Row>
    <Cell><Data ss:Type="Number">11</Data></Cell>
    <Cell><Data ss:Type="Number">22</Data></Cell>
   </Row>
  </Table>
 </Worksheet>
 <Worksheet ss:Name="Sheet2">
  <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="1" x:FullColumns="1"
   x:FullRows="1" ss:DefaultRowHeight="15">
   <Row>
    <Cell><Data ss:Type="Number">33</Data></Cell>
    <Cell><Data ss:Type="Number">44</Data></Cell>
   </Row>
  </Table>
 </Worksheet>
</Workbook>
Also, read this:

https://www.codeproject.com/Articles/18 ... x2714732xx
https://www.autoitscript.com/forum/topi ... orksheets/

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Wed Oct 02, 2024 5:51 am
by mol
Thank you Rathi. I will try to use it.

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Wed Oct 02, 2024 6:55 am
by mol
Thank you Edward!
Jesteś niezawodny jak zawsze!

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Wed Oct 02, 2024 8:04 am
by edk
Nie ma sprawy. BTW zauważyłem "czeski błąd" przy komentowaniu wywołania funkcji DodajArkuszXLSX(): zamiast /* Ramki_naglowkow /* powinno być oczywiście /* Ramki_naglowkow */, stąd nie działają poprawnie pozostałe parametry: ramka dla danych i dopasowanie szerokości kolumny do treści nagłówka kolumny :oops:

Code: Select all

************************************************************************************
Function MakeXLSX()

Local workbook, cFile := "Demo_DBFsToXLSX"

workbook := SkoroszytXLSX( @cFile )
IF !Empty ( workbook )
    DodajArkuszXLSX(workbook, "dbf_1.dbf" /* cDBFFile */ , "Arkusz nr 1" /* cTytul */ ,  { "#", "Imię", "Nazwisko", "Data urodzenia", "Żonaty/zamężna?" } /* aNaglowki */ , /* nOrientacja */, .T. /* Ramki_naglowkow */, .T. /* Ramki_danych */, .T. /* AutoFit_danych */ )
    DodajArkuszXLSX(workbook, "dbf_2.dbf" /* cDBFFile */ , "Arkusz nr 2" /* cTytul */ ,  /* aNaglowki */ , 2 /* nOrientacja */, .T. /* Ramki_naglowkow */, /* Ramki_danych */ , /* AutoFit_danych */ )
    TworzXLSX( workbook, cFile )
ENDIF

RETURN

Re: Export data to OpenOffice Calc and MS Office Excel

Posted: Wed Oct 02, 2024 5:40 pm
by mol
I can't find a way to display cells rotated by 90 deg.
Is it possible to do?