Welcome! Log In Create A New Profile

Advanced

Spreadsheet control

Posted by SteveSitas 
Spreadsheet control
September 16, 2021 08:16PM
Hi,
is there a way to save a Spreadsheet DIRECTLY from a Spreadsheet control to a field in a database?
I mean without first saving it to a .xlsx file and then using floadBuffer ...

Ideally, It should work with a Ribbon Source IW.

Works just fine with the WORD control

Regards
Steven Sitas
Re: Spreadsheet control
September 17, 2021 03:06PM
Hi Steven,

I use hLinkmemo for this. Works fine.

Best regards,

Aad
Re: Spreadsheet control
September 17, 2021 03:34PM
Hi Aad,

don't you need to first export to a file before using hLinkmemo in this scenario ?
I was hoping to use the Spreadsheet control DIRECTLY - not using .Save to first save to a file.
Am I missing something?

Regards
Steven Sitas
Re: Spreadsheet control
September 17, 2021 04:08PM
Hi Steven,

This is the code I use for saving the sheet in a .FIC file.
I don't know if it will win a prize for best coding, but it works for me.

Best regards,

Aad


IF PSHEET_1..Modified = False THEN Info("Spreadsheet not changed.");RETURN
IF SpreadsheetSave(PSHEET_1,Bestandsnaam,psheetOverwriteAllowed) = False THEN Info("Spreadsheet not saved")
HLinkMemo(VVE,Document,fCurrentDir()+"\"+Bestandsnaam,hMemoImg)
VVE.Naamdocument = fCurrentDir()+"\"+Bestandsnaam
HModify(VVE)
fDelete(fCurrentDir()+"\"+Bestandsnaam)
Close
Re: Spreadsheet control
September 17, 2021 05:03PM
Hi Aad,

thanks for the code, but you are also using a temporary file and fCurrentDir() - I was hoping for a direct access method, just like the one I am using with Images or the WORD control.
Seems like the SpreadSheet control is NOT as sophisticated as the WORD control AND it is very buggy.


Regards
Steven Sitas
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: