It is currently Tue Aug 11, 2020 5:28 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: ExcelWriter (creates MS-Excel '97 compatible files)
PostPosted: Fri Apr 07, 2006 7:09 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
Hi,

i made a conversion of the excelapi from Paul Squires. (see here http://www.planetsquires.com)

http://www.purebasicpower.de/?ExcelWriter

Klaus


Last edited by ABBKlaus on Mon Jan 05, 2009 7:40 pm, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 07, 2006 7:32 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:51 pm
Posts: 2808
Location: Portugal, Lisbon
Well i've seen that it doesn't require F64 lib anymore, but it just creates a blank document for me...

_________________
Software: http://xipa.org
Elevator Maintenance: http://central-elevadores.pt
Good web hosting!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 07, 2006 7:53 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
the example with the XIncludeFile does not need the F64 lib its only for PB4 Beta !
but i can´t reproduce your problem with the blank file, the example i delivered just works fine here.
can you put a snippet together and post it here :?:
you can also debug each command :
Code:
XIncludeFile("Source\ExcelWriter_res.pb")
XIncludeFile("Source\ExcelWriter.pb")

XLS_Init() ; Wichtig !!! muss hier stehen ist ja keine PB lib

Debug XLS_CreateFile("C:\Data\Test.xls")
Debug GetLastError_()

Debug XLS_PrintGridLines(#False)
Debug GetLastError_()


Klaus


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 07, 2006 8:03 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:51 pm
Posts: 2808
Location: Portugal, Lisbon
Tried that and - No errors! :shock:

I just get a 900kb empty file...

I wonder if it has something to do with using OpenOffice...
I find the size too big, for such a small output...

_________________
Software: http://xipa.org
Elevator Maintenance: http://central-elevadores.pt
Good web hosting!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 07, 2006 8:10 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5755
Location: Berlin - Germany
In opencalc i see nothing, but in excel is good :wink:

_________________
PureBasic 5.71 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 19.3 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Apr 26, 2006 9:38 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Sep 16, 2004 9:50 pm
Posts: 658
Location: France
Very useful, thanks a lot :D

_________________
DroopyLib/PBFastLib/HMod


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 26, 2006 9:35 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1542
Location: In a long distant galaxy
hello,

i began a lib (pb4) for writing excel files in XML format.
Since MS Office use this format it becames much easier to implement.

you might be interested in this try - ( just a start - not a full featured lib )

PureXLS -> UserLib_PB40_PureXLS.zip
Image

here is how xml tags are organized :


Code:
<?xml version="1.0" encoding="UTF-8"?>

<Workbook>
   
    <Styles>
        <Style>
            <Alignment/>
            <Borders>
                <Border/>
            </Borders>
            <Font/>
            <Interior/>
        </Style>
    </Styles>
   
    <Worksheet>
        <Table>
            <Column/>
            <Row>
                <Cell>
                    <Data/>
                </Cell>
            </Row>
        </Table>
    </Worksheet>

</Workbook>

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 27, 2006 12:13 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 721
Location: Spain
Flype wrote:
hello,

i began a lib (pb4) for writing excel files in XML format.
Since MS Office use this format it becames much easier to implement.
don't works in Office 2000 :?

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 27, 2006 6:30 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1542
Location: In a long distant galaxy
oh sorry, i forgot to say that MS Office understand XML Worksheets only since MS Office XP/2002/2003/+

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 09, 2007 11:53 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
recompiled for PB4.10 Final :!:

http://www.purebasicpower.de/?ExcelWriter


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 10, 2007 11:08 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 03, 2005 1:31 am
Posts: 573
Location: Australia
Thanks alot for this. Looks very useful. However I quickly tried the supplied example to write out some unicode text, and open the resultant excel file and the text appeared as garbage chars instead of the Japanese text I typed (compiled with UTF-8 source & set compile to unicode & specified subsystem 'UserLibUnicode'). I also tried changing the font to a Japanese one, but same result. Has the unicode version been tested? Thanks again.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 04, 2008 5:16 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jan 02, 2007 8:16 pm
Posts: 4327
Location: Cypress TX
I cannot get it to work in 4.2b2

I get the same error attempting to run the example code:

http://www.bluemesapc.com/image/excelwrite1.jpg

What am I not doing.

And how many of those User Libraries do I have to install? :D

_________________
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/


Last edited by Rook Zimbabwe on Tue Mar 04, 2008 4:17 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 04, 2008 5:24 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jan 02, 2007 8:16 pm
Posts: 4327
Location: Cypress TX
I remmed out:



; XLS_Init() ; Wichtig !!! muss hier stehen ist ja keine PB lib

Debug XLS_CreateFile("C:\Data\Test.xls")
Debug GetLastError_()

And debug showed
Quote:
0
6
0
6


But it appears to have worked... the file exists. 4.1 not 4.2b2

And I have to put the two resource files in the same directory as the program.

_________________
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 04, 2008 12:27 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
Sorry Rook, i had no time to compile a new userlib for Beta2.
You could use it as include file :

Code:
XIncludeFile #PB_Compiler_Home+"Examples\Excel_Writer\Source\ExcelWriter.pb"
;include the resident file if needed
XIncludeFile #PB_Compiler_Home+"Examples\Excel_Writer\Source\ExcelWriter_res.pb"
;Init
XLS_Init()


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 04, 2008 4:16 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jan 02, 2007 8:16 pm
Posts: 4327
Location: Cypress TX
I keep getting this error

Mind yuo, I am not using UNICODE or threadsafe...

Image

:?:

It opens one of the include files and stops on that line...

_________________
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye