QUOTE(ParaffinPower @ Jul 26 2008, 07:01 AM) [snapback]71960[/snapback]
Hi
CX-S is very new to me, and I have a few questions.
I'm logging data to Excel, which is working well. I'd like to automatically create a new XLS from a button push(from an Excel Template) and continue logging. I'm sure it's just a bit of VB script, but I'm learning.
Will I be able to name the file?
Will I have to temporarily stop logging whilst the new sheet is created?
Thanks, Pp
Hi PP,
At first it seems a bit obvious you will have to stop logging, but actually there are quite some questions about what you're doing...
a) If you're using the CX-Supervisor Data Logging feature, to log to a DLV file but then export to an XLS file then you can name the file you are exporting to.
b) If you're using the CX-Supervisor Database function to log to Excel directly (or via data logging feature!) then you can use a DBExecute command to change the "Source" of the Recordset, to log to a new file.
c) If you're using VBScript with ActiveX object "Excel.Application" then I think this offers all the commands needed.
d) And are you actually creating a new XLS File, or just a sheet within the current file?
e) If you're using DDE: good luck - you're on you're own
Which of these are you doing?
Without all the knowledge, my first thought is actually you probably want to seperate the data logging from the data viewing. Therefore you would use a hidden database (or relectantly, a XLS) to log ALL data and use other spreadsheets to 'query' the data as required.
About the Button... Are you talking about a CX-Supervisor button, of a XLS button on the spreadsheet? I assume this is CX-Supervisor as the action would have to control the CX-Supervisor logging.
Regards,
Bertie