mgvwx Posted March 10, 2022 Share Posted March 10, 2022 What is the best way to generate worksheets using Python? I've got it working using two nested for-loops and vs.SetWSCellFormulaN, but this runs very slowly - I'm wondering if there's a way to programmatically generate a temporary CSV file and then import that? Cheers Quote Link to comment
Pat Stanford Posted March 16, 2022 Share Posted March 16, 2022 I have created some fairly large worksheets using SetWSCellFormulaN and have not found it excessively slow. How big of worksheets are you trying to create? Where is the data coming from? I'm sure you could write a delimited file and then import it, but I can't see that as actually being faster than an internal script. Quote Link to comment
Sam Jones Posted March 16, 2022 Share Posted March 16, 2022 14 hours ago, Pat Stanford said: I have created some fairly large worksheets using SetWSCellFormulaN and have not found it excessively slow. Depends on what you mean by "excessively slow". I have removed, separated out, some WS creation because it slowed things down too much. Unfortunately, the need for the WS creation remained, and was put in a separate command. (When I could). The speed problem came about when I was creating long list of havested information with concatenated data. After several tests isolating the data collection, data concatenation, and writing the cells, writing the cells was the main drag on time. Still it was the fastest way I had of making the lists I needed. One could always try typing the data into a list of any kind by hand, to make one put up with a slow script. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.