Jump to content

Recommended Posts

Posted

@Randallc

Looking through your functions there seemed

I agree with what blink314 says. The Excel UDF is a great tool, but it is to massasive. A much better way would be that you spilt the large UDF in small pieces per XLS function (or function group). Rather than loading the whole include in a script when you only need 1 subfunction of them all.

@picasso

Thanks a lot !! I will test it today. I will also look at the links you provided.

Did you have a change to look at the available C code examples on the SQLite hompage (I have put a link in the post in the developers are) ? I there something that a C programmer could pick up easily to create a dll to be used as plug in .

@blink314

I am doing an import

The SQLite comes along wiht a command line tool that handles import of data. I haven' t tried it yet but it might be worth looking in to that if you need to import large amount of data.

PS:

I will update the TO DO list.

Remove the Bugs and add more kind of FIXES.

Rather than bugs there are here and there some small changes to do, to get it all correct.

Posted (edited)

@ptrex;

Yes, I know, now! - not when I started, very green!

See in my first few lines;

; Version: Please note; this is provided "as is" and was only intended as a "stop-gap"

; Version: It needs major re-writing, even from what I know, and errors are a problem; good luck!

It seems to work OK for me on many machines and setups, and most functions (not all!) work on office97 too.

I had hoped to encourage someone who could program better to do it better!

I am thinking of renaming it; I imagine your idiosyncrasy with errors is becuse you have OfficeXP?; I'll call it "Excel2003com.au3", and maybe not have any error complaints!

Best, Randall

Edited by randallc
Posted (edited)

@blink314

Found a work around for the Excel COM jumping problem.

GUISetState(@SW_SHOW, $Main)

GUICtrlSetState($ExcelLV,$GUI_FOCUS)

MouseClick("Left")

Add these 2 line to the code and the problem is gone.

What it does is clicks in the Excel COM when opening the GUI.

I will close the Bug.

Edited by ptrex
Posted

@blink314

GUISetState(@SW_SHOW, $Main)
$tmp = WinGetPos($GUIText)
    MouseClick("left", $tmp[0] + 275, $tmp[1] + 30,1,1); Clicks in the first cell of Object GUICtrlCreateObj($ExcelLV,265,1,730,415)

This solution for kjactive is even better, than my previous one. Give it a try.

Could you upload a more recent version, including this change. So I can do some more testing.

Thanks

Posted

@blin314

At about line 320 only the 2 line added.

@jpm

It works on Office XP. because I work with Office XP.

The only thing you need to do is.

Uncomment the lines like here at 1567

$ExcelLV = ObjCreate("OWC10.spreadsheet"); Office XP

If not IsObj($ExcelLV) Then

$ExcelLV = ObjCreate("OWC9.spreadsheet"); Office 2000

EndIf

if not isobj($ExcelLV) then

$ExcelLV = ObjCreate("OWC11.spreadsheet"); Office 2003

EndIf

And comment the line at 1584

;.ViewOnlyMode = True

Have a go.

Posted

@jpm: are you talking about ExcelCom or the database program? The database program does NOT use the excelcom udf. If you are talking about using the database, follow ptrex's intructions. If not, could you clarify?

Kevin

Posted
Posted

@jpm: are you talking about ExcelCom or the database program? The database program does NOT use the excelcom udf. If you are talking about using the database, follow ptrex's intructions. If not, could you clarify?

Kevin

in the #156 post you have e reference to ExcelCom.au3. I was thinking it was the problem until I just found out the the OWC11 is still my problem for Office XP. changing to OWC10 just show an error at the statrtup on the .ViewOnlyMode = True setting

You can certainly manage to switch to the right OWCxx reading some key registry.

Keep going the good work B)

Posted

@jpm

If you (un)comment the lines as mentioned in Post #171,

than everything should work for all versions of Office.

But reading the registry, is indead an option to up in the final Version.

PS: if you like the SQLite project you might want to give it a 5 star rating B) (for Kevin)

Posted

New version.

- Excel object jumpiness fixed (I dont like the fix, it tends to select cells, but it solves the problem!).

- Import from excel. If importing into existing table you are responsible for assuring the number of columns match. Only the first n columns will be imported from the excel file (where n is the number of table columns).

- Status line for reading/importing large numbers of records. This will eventually be used by other functions as well.

- Open "" no longer creates empty database file.

- Uncommented the Office Object stuff so others dont have to... this may be "unfixed" in future versions because I am going to recomment the lines... I'll try to remember but cant promise.

Kevin

Database_1.au3

Posted

If anything it would be an ini file... I keep registry editing on work computers to a minimum!

Kevin

It is not a question of editing the registry but just reading. .ini can be wrong with what is really installed.
func _GUICtrlCreateListViewEnhanced($col_names, $x_pos,$y_pos,$width,$height)
if RegRead("HKCR\OWC9.spreadsheet","") then $ExcelLV = ObjCreate("OWC9.spreadsheet")
if RegRead("HKCR\OWC10.spreadsheet","") then $ExcelLV = ObjCreate("OWC10.spreadsheet")
if RegRead("HKCR\OWC11.spreadsheet","") then $ExcelLV = ObjCreate("OWC11.spreadsheet")
Posted (edited)

I'll give it a try...

Kevin

Seems to work... make note that Office 2000 does not appear to have a spreadsheet control (from what I've read) so OWC9.spreadsheet is pretty meaningless.

Edited by blink314
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...