T O P I C R E V I E W |
Fabi K |
Posted - 04/29/2022 : 04:32:30 AM Hi everyone,
I want to duplicate an existig sheet with data to a new sheet with another template. I dont want to duplicate all data but only specific columns selected by theier longnames. What is the best way to do this? I tried using pandas but than the data was only in one column.
Thanks in advance Fabi |
2 L A T E S T R E P L I E S (Newest First) |
Fabi K |
Posted - 05/09/2022 : 06:04:20 AM Hi James,
thanks for your help. I’ve solved it a little differently. The problem was that the csv data is very large and wks.to_list() did not work. So I used wb.duplicate() (def originpro.base.BasePage.duplicate) and deleted the unnecessary columns with wb.del_col(). After that, the data was small enough to use wb.to_df() and put it in a template where I could process the data further. |
YimingChen |
Posted - 05/02/2022 : 11:57:53 AM You can use wks.to_list() to pass data from specified column to Python list and wks.from_list() to pass data back to worksheet column. See the reference page: https://www.originlab.com/python/doc/originpro/classoriginpro_1_1worksheet_1_1_w_sheet.html#a1373d42387a3ac2396a0e535fee74078
James |