Hi Simon,
I had put that on the back burner, because I thought I would have to build my own DLLs from the Github source, but was happy to see they are included in Rafael’s zip. In my case building the DLLs would have meant doing stuff on my home computer and copying it over…glad I didn’t have to do that.
There is something I will use it for immediately. I have a program that has to produce source for mailmerge. The main file can be a CSV, but there is a subsidiary file that needs to be an XLSX, and I have to manually create that from the CSV, including setting the format for a numeric column to text, because otherwise Word cannot match things up.
However, looking at the example, I still ask myself – is this a sensible thing to be getting into? Writing code like: chart2.SetTrendlineLine(series2,color:purple,5.25,XLSX:DASH_SOLID,10)?
To figure out what sort of line you wanted you would already have done the point and click for the trendline in Excel, and then you have to translate that into a sort of VBA command and put it in your Clarion program. In the real world, presumably, this would be a situation where you create the graph once and then it is run many times with new months of data or whatever. Maybe the rational approach to that is to have your spreadsheet all set up with your graphs and your formats and all (using Excel), and the only thing you have to do each month is push the new data set into the workbook.
And, yes, it is good to be able to do that data push from Clarion…sometimes. What I’ve been playing with over the last couple of weeks is Power Automate, where the vanilla version comes with Windows 11. I can use that to send a query to the database and write the result to a particular location in an Excel workbook that already has all the bells and whistles in (you just provide the top left corner for where to write the data). In general, a lot easier than writeString/writeNumber commands, one for each cell.
I have an Excel report that is about 10 pages with 20 queries, and a bunch of graphs running off the imported data, and mostly it is three commands per dataset: set the worksheet, run the query, write to the worksheet. Seems like a good tool for the job.
Jon