Does anyone know what order a table would be written into Excel with a paste from data in the CopyTableToClipboard?
I have a script which collates data from several sources, opens an Excel template, writes 3 tables to an existing page, copies 2 larger tables each to its own new sheet, and then saves the template to a different network folder with a .xlsm filename based on data.
However, on the sheet added last, I believe the last column may not finish pasting before the save occurs. Putting in a delay before the save doesn't seem to have any effect. (Perhaps the delay is just spun out to another core via multi-threading?)
The last table has the most data elements at 38 columns by about 10,000 rows.
I'm wondering what data is written last in the paste. Do I need compare the last row or column of the source table to the destination excel row/column before allowing the Save? Or perhaps just check the lower, right cell of that sheet?
Any better suggestions?