Hy there,
After giving up on the database stuff (see previous postings) I turn my
attention to export data to Excel.
Again, my basic problem appears to be kind of easy:
I need only one function, that writes data (a two dimensional "double" array
with a known amount of rows and columns) in an excel file. Furthermore, this
function should detect if a consigned file already exists, if so, the data
should be written into a new created worksheet.
Unfortunately, the task turned out not to be that easy, not at least due to
the "Could not launch the help file" message on about 80% of all the
functions in the library. Did I forget to install this file? Which file is
looked for? Can I add this file subsequently?
So far, I have the following questions:
- After creating a new workbook (Excel_WorkbooksAdd()) there are by default
3 worksheets in it. I only want to have one though. How do I delete the
additional two? Excel_WorksheetDelete() causes a dialog box from Excel. Or
how do I create a workbook with only 1 worksheet?
- After inserting some data, I want to format the appropriate range with the
Excel function Format->Column->AutoFitSelection. How do I do that?
- I want to create a graph based on this data. The first column is a date, I
want to create an XY(Scatter), smooth line, rest default graph. But when I
call the function Excel_ChartChartWizard the error with code 0x800a03ec,
ChartWizardMethod or Chart class failed occurs. I took the function call
directly from the excel97demo.c, only I changed ExcelConst_xl3DSurface in
the gallery parameter to ExcelConst_xlXYScatterSmooth.
- After calling Excel_AppQuit, the visible application closes, but there is
still a process running which can't be closed but with the task manager.
Furthermore, if I try to open the created Excel file, the frame of the Excel
application appears, but no data is displayed. After shutting down, an WinNT
exception error occurs.
In regard to the amount of questions to be expected: Does NI provide any
documentation about using the Excel97 Library?
Or do I have to go through the whole ActiveX crap and learn, what GUID clsid
= {0x20818, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46} and stuff
like that means??
Thanks in advance for any response!
Harald
mailto:HIlg@gmx.net