7 ms·
Looks great, but I ran into an issue I'm hoping you can help with. I copy/pasted the very first example from the blog and it doesn't compile. I also have been u
by charlieflowers 4y ago
Looks great, but I ran into an issue I'm hoping you can help with. I copy/pasted the very first example from the blog and it doesn't compile. I also have been unable to find the documentation necessary to get past the problem.
It's the example that reads the files in a dir and makes an Excel table, and it fails on line 16, which reads `(excel.Selection as Range).WriteTable(files, "myNewTable");`.
The error is `Argument 2: cannot convert from 'System.Collections.Generic.IEnumerable<<anonymous type: string File, long Size>>' to 'QueryStorm.Data.ITabular' | `
I can't find docs for WriteTable() [even after finding those gitlab repos that contain QueryStorm docs].
I think anyone trying to run with this, will need access to docs on the API.
- anakic 4y agoThanks for trying it and replying back here. It looks like I was using a pre-release version of QueryStorm while I was writing the blog post. I just released that version so if you restart Excel you should get an "Update available" button in the QueryStorm ribbon in Excel. Could you update and post back if that fixed the problem? Another way of "fixing" it would be to replace the following line: (excel.Selection as Range).WriteTable(files, "myNewTable"); with this line: Write(files, "myNewTable"); The Write method is available globally (it's not a method that belongs to a class). This is a trick specific to C# scripts (would be illegal in regular C#). The documentation does lack detail in some areas, which I basically cover by answering questions via email. I do need to invest time every so often to update and extend it.
- charlieflowers 4y agoThe update fixed it. Thanks! Look forward to giving it a spin.