- Posts: 4
Exchange data with Excel
- sabrina.hasni
- Topic Author
Less
More
29 Apr 2021 17:31 #9538
by sabrina.hasni
Exchange data with Excel was created by sabrina.hasni
Hi all,
I have been reading the comments on how I can write a script with the SDK tool.
I tried to do a test by putting a file in the C drive calles 'test'
xlobject=xl_create;
xl_open(xlobject,"C:\test.xlsx");
data_str=xl_get(xlobject,"Mydata");
xl_close(xlobject);
xl_free(xlobject);
data=real_array(data_string);
I have the following message error when trying to run the script.
[1] referencing unassigned variable:xl_create
Is it possible to know why? are there any templates we can use which explains this better?
kind regards
Sabrina
I have been reading the comments on how I can write a script with the SDK tool.
I tried to do a test by putting a file in the C drive calles 'test'
xlobject=xl_create;
xl_open(xlobject,"C:\test.xlsx");
data_str=xl_get(xlobject,"Mydata");
xl_close(xlobject);
xl_free(xlobject);
data=real_array(data_string);
I have the following message error when trying to run the script.
[1] referencing unassigned variable:xl_create
Is it possible to know why? are there any templates we can use which explains this better?
kind regards
Sabrina
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
03 May 2021 12:18 #9546
by pgilman
Replied by pgilman on topic Exchange data with Excel
Hi Sabrina,
The name "xl_create" is the name of a function, so you cannot use it as a variable name.
Please see these examples for how to use SAM to interact with Excel files:
github.com/NREL/SAM/tree/develop/samples/Excel%20Exchange
Note that these functions only work with Windows versions of SAM.
Best regards,
Paul.
The name "xl_create" is the name of a function, so you cannot use it as a variable name.
Please see these examples for how to use SAM to interact with Excel files:
github.com/NREL/SAM/tree/develop/samples/Excel%20Exchange
Note that these functions only work with Windows versions of SAM.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman