Excel Reports - without the need for csv

Get it here: https://extensions.sketchup.com/extension/d18f5dc3-ac1c-4615-9e4b-7afc702181cd/xlsx-dumper

More info here: https://kg-dev.be/project/xlsx-dumper-for-sketchup/

Original post, before the extension was made public:

What if reports would be written directly to Excel files, without the need to export to .csv and manually copy the data, search for the correct .xlsx template file, paste the data and save the resulting .xslx as a new file, without accidentally overwriting the .xlsx that is the actual template?

Would that be useful?

I have a proof of concept ready and I am wondering if there is interest for such an extension. Right now:

  • a template is nothing more than an excel file with an “input” sheet. Additionally, the template can have as many other sheets, images, charts, formulas, … as you would like.
  • the first row of the input sheet defines what should be placed in the file. You can have this as PersistentId, Path (chain of persistent ids, for nesting), name, definition name, whether it is a group or component, … and all dynamic attribute values.

You can see a proof of concept here:

If you believe this seems useful to you, just let me know. If you believe it is not useful yet, but could be with some additional features, also, please feel free to let me know.

3 Likes

Does it needs Excel? If so, another dependencies and ongoing software expenses. HTML5+JavaScript provides enough to have any king of reports - https://www.youtube.com/watch?v=YxuKXm0tcIA&feature=youtu.be

It does not rely on Excel. It can read/write xlsx files independently.

Nice intiative, :+1:

1 Like

With a direct tie to a layout template. Even better

Or google sheets… shared online

1 Like

How do you see that?

That is a possibility that I have thought about. I have done some project in the past where Google Sheets was involved, although it was for reading data from Sheets, instead of writing to it.

If the file can be formatted correctly before export (desired columns, correct row and column ordering, font and text size, etc.) I would find it very handy to export a .xlsx file to insert into LayOut files. If I’d still have to do all that formatting in a spreadsheet application to make the file useful, it doesn’t matter if comes out of SketchUp as .csv or .xlsx.

I see, right now it is pretty rough, but, your template, which is also a .xlsx file, somewhat defines this formatting. On the “input” sheet you define, by adding column names to the first row, what values will be placed where. Currently a few parameters are supports as well as all dynamic attributes. For each unique component instance path a row will be created and, depending on which headers there are defined on the first row, values will be placed. This input sheet is pretty rough, but, of course, all your other sheets can link to values in the input sheets, and do entirely different formatting. In the demo movie I have a second sheet that contains just 2 values (number of encountered groups and number of encountered component instances) and also creates a graph using this data. I had to create this (I admit, very simple) template once, but now I can generate as many reports as I please, using this template, that will automatically recreate the graph with the correct values.

Interesting. So it sounds like it would be very much like Report Generator but with .xlsx output. Is that right. Unfortunately for my use there’s not much value in adding dynamic attributes to the majority of components I make. In fact doing that would easily double the time invested in making most models. The native Report Generator doesn’t work for my use because the way it reports dimensions actually creates more work for me.

I expect there would be a number of applications for what you propose but it sounds like I’ll be continuing with .csv to .xlsx in Excel.

Then tell me what would not create more work for you :wink:
That’s the fun part, I want to make what you (or, well, hopefully many others of course) need, not what I think you and they need.

Besides the data itself, it is more important to know when the data was produced and from what model. If the dates do not correspond, there should be a warning.
This could be part of a combination of templates (SketchUp,LayOut scrapbooks and excel)

Thus, like in Layout, have a warning that the related SketchUp model is updated since the last “data-refresh-time”?

That is a possibility, but the way I see such feature, would tie it very hard to Excel (the application), since that would I believe require an Excel Addin, instead of a SketchUp extension.

EDIT:
Now, @MikeWayzovski, maybe this is not such a crazy idea, reversing it and creating an Excel Addin that makes it possible for Excel to read .skp files and extract its data.

After I get back from removing an old garage door opener I’ll send you an example to see what I need. Thanks.

1 Like

What’s currently lacking in LayOut or the SketchUp ’Universe’ is that when you modify a SketchUp Model, it is notified upon opening the corresponding LayOut Document, but there is no warning that it has generated a report (or excel)
If you don’t forget to generate the report or create a new Excel and not forgot how it was named and saved, LayOut would recognise them, too.

So, if you create a report, it should have recorded (name and location) and perhaps a notification before closing or saving.

Ideally, imo, if one can save a template to the model with Generate Report, why not update it directly from within LayOut?

1 Like

It would be very very useful!
One thing I find missing in the native report tool is the possibility to filter the report results, such as in not wanting the hidden objects to appear in the report. In many cases the hidden objects are INSIDE other objects, so adding the nesting level(s) selcetion for the report would also be great.
Such features would be very handy in generating your own report!

1 Like

The way I have it now is that the visibility is exported to the report, as a true - false value. In the movie in the end you can see an IsVisible header. This still means in the end all components and groups will be added to the excel, but your other sheets, also part of the same .xlsx, can easily filter out invisible elements.
The same goes up for the nesting. Right now I export an instance path (so: parent id dot parent id dot parent id), but u can easily add a parameter that tells the level of nesting as a number. Then, you could use that parameter to filter out values.

It still means that in the end, all objects are passed to excel and that the filtering is part of the chosen template and thus not up front.

How does that sound?

The problem with nesting is that it could change (un)intentionaly. You still have to have a system and model accordingly. Can you add classification(s!) as well? :slight_smile:

Oh, yes! Definitely.

Is see what you mean. Quickly added IFC4 xsd and classified 2 elements:


Do you happen to have a some other classifications that would matter to you or your public? Anyhow, all classifications are now supported in the tool I am working on. If you add an MY_SCHEME.xsd to your model and classify elements, their classification will be added to the column containg Classifications.MY_SCHEME as a header.