The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Python
 How to extract window names to excel file?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

spcwbyy

Germany
2 Posts

Posted - 05/16/2024 :  11:35:36 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am trying to extract all the data from a .opju file to .xlsx file but I cannot extract the window names. There are several windows and related data in these windows, I want to extract these data according to their corresponding workbook names but I couldn't. (I can't write the names of every window individually because there will be too many)

Anybody know how?

Thank you in advance

OriginPro 2024 (64-bit)
10.1.0.170 (Learning Edition)

ES

Edited by - spcwbyy on 05/16/2024 11:58:51 AM

ChaoC

USA
174 Posts

Posted - 05/16/2024 :  12:55:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello ES,

You can use pages(). See: https://docs.originlab.com/originpro/classoriginpro_1_1pe_1_1Folder.html

Example to print the workbook names in the project:

for wb in op.pages('w'):
   print(wb.lt_range())


It will list them in the order present in the Project Explorer.

Best,
Chao
Go to Top of Page

spcwbyy

Germany
2 Posts

Posted - 05/16/2024 :  5:12:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Chao,

Thank you so much for your help:) It worked!!

Best
ES


quote:
Originally posted by ChaoC

Hello ES,

You can use pages(). See: https://docs.originlab.com/originpro/classoriginpro_1_1pe_1_1Folder.html

Example to print the workbook names in the project:

for wb in op.pages('w'):
   print(wb.lt_range())


It will list them in the order present in the Project Explorer.

Best,
Chao



ES
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000