Filip L Posted January 9 Posted January 9 Dear all, I cannot create an additional worksheet in a workbook via Datalab although I tweaked the code proposed by the AI assistent. (version seeq-spy 193.17) Regards Filip
Seeq Team Bryan Zimmerman Posted Friday at 01:07 AM Seeq Team Posted Friday at 01:07 AM Hi Filip, The syntax for adding a worksheet is... new_worksheet = my_workbook.worksheet('Extra_Worksheet') You could add items to the worksheet by setting the display items. For example... items = spy.search({'Path': 'Example >> Cooling Tower 1 >> Area B', 'Type': 'Signal'}) new_worksheet.display_items = items And then pushing the workbook... spy.workbooks.push(my_workbook) I've logged a ticket to improve our documentation in this area, which will also allow the AI Assistant to provide a better answer. Thanks for the question! Bryan 1
Filip L Posted Friday at 10:51 AM Author Posted Friday at 10:51 AM Thanks Bryan, that worked. But I have an additional question. Why do I get an empty workbook_df when trying to look for the workbook via its path ... which is not the case when I look for it via the ID?
Seeq Team Solution Bryan Zimmerman Posted Friday at 04:31 PM Seeq Team Solution Posted Friday at 04:31 PM Hi Filip, There are two issues preventing the search from working as expected: The Analysis Name needs to be specified separately from the Path The "My Folder" needs to be removed from the path (SPy defaults to searching in "My Folder") This will work... spy.workbooks.search({ 'Path': 'Python', 'Name': 'TestWorkbook' }) It is possible to specify "My Folder" in the Path, but a constant must be used as follows... spy.workbooks.search({ 'Path': f'{spy.workbooks.MY_FOLDER} >> Python', 'Name': 'TestWorkbook' }) You would use the same technique if you wanted to search in the CORPORATE, PUBLIC, or SHARED folders.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now