How to prevent `ssconvert` recalculating Excel file before conversion? - export-to-csv

I am trying to convert the .xlsx file http://www.eia.gov/forecasts/steo/archives/mar14_base.xlsx into a .csv, but it seems that the .xlsx contains formulae that link to a local file that I don't have (the creator of the file must have forgotten to paste as values instead of as formula)
so each time I use ssconvert it tries to recalculate the formula, which fails hence I can't get the data:
ssconvert --export-type=Gnumeric_stf:stf_assistant -O "locale=C
format=automatic separator=, eol=unix sheet='3atab'" "STEO_m.xlsx"
"text.csv"
triggers the following message: (and the values inside the .csv are missing)
(/usr/bin/ssconvert:14771): GLib-GObject-WARNING **:
g_object_set_valist: object class 'SheetObjectImage' has no property named `style' '7etab'!BM7 :
'VLOOKUP($A7,[1]oracle_allbbb!$2:$89130,Dates!BM$12+1,FALSE)' Invalid expression
I have seen that there is also a --recalc argument in your ssconvert function but actually I want to do the opposite!
ssconvert --recalc=FALSE --export-type=Gnumeric_stf:stf_assistant -O "locale=C format=automatic separator=, eol=unix sheet='3atab'" "STEO_m.xlsx" "text.csv"
Is there any piece of advice you could give me to find a solution here?

Apparently it was a bug. It is fixed here.

Related

Matlab unable to format string to path

In original script there is part of code where is this
filepathsource='C:\Users\...';
strFP=dir([filepathsource '*.txt']);
Which works nicely.
Problem is that i need to change that filepathsource to some more dynamic so i did.
filepathsource=string(strcat(app.folderPath,'\',string(app.currentCount),'\'));
strFP=dir([filepathsource '*.txt']);
But i end with error
Error using dir
Name must be a text scalar.
And i need original formating because i get errors later in script. Is there any way how can i fix it? I tried everything but always is something somewhere wrong. And i just dont understand whats difference between original filepathsource and the one that i created bot are strings. (output of my filepathsource is correct when i display it)

Convert PSS/E .raw file to Pandapower

I'm trying to find a possible way to convert PSS/E native .raw files to Pandapower format.
My objective is to take advantage of the network plotting capabilities that are available in Pandapower.
For that, I have to first be able to load my grid data into Pandapower.
For that, I have to somehow bridge the gap between PSSE .raw to Pandapower.
Literature says that a possible way of doing this is by using the 'psse2mpc' function available in Matpower.
I've tried to use it but I get the following error message:
(quote)
>> psse2mpc('RED1523.raw')
Reading file 'RED1523.raw' ............................................. done.
Splitting into individual lines ...error: regexp: the input string is invalid UTF-8
error: called from
psse_read at line 60 column 9
psse2mpc at line 68 column 21
(unquote)
I'was informed that maybe I should save my .raw file (natively generated with a PSSE/E v33 version) into an older .raw format (corresponding to previous PSS/E versions).
I've tried this as well but still have the same error message.
Apart from getting this error which so far impedes to reach my objective, I've been unable to guess the Pandapower "equivalent .raw" structure. Does anybody know how this input structure looks like in Pandapower?
If I would know how Pandapower needs to get the input data, I could even try to code a taylor-made python script that converts my .raw file into whatever is required from Pandapower.
If somebody could help me to get out of this labyrinth I would be most gratefull !!!
Thanks.
Eneko.
You need to check your .raw file to enter the other Inputs of the psse2mpc function. For instance, if I have the case39.raw file and I want to convert it to matpower format like case39mpc.m, then I must enter something like this:
psse2mpc ('case39.raw', 'case39mpc.m', '1', '29')

How to use saveas() to save a .mat or .txt in specific directory on ubunto

I have tried:
saveas(keys ,keyname);
save(keys ,keyname ,'-mat');
save(keys ,keyname);
where keys is a 3006x4104 matrix of the class double.
I tried to use some casting so I would save it as txt file
for keyname I tried - ./newdronephotos/1880key.mat
and newdronephotos/1880key.mat.
It's not working.
In particular, when I'm trying saveas(keys ,keyname);
it's starting to do some processes and then print the error message:
Error using saveas (line 88)
Simulink object array must be a vector
Actually, I just succeeded to solve my own problem.
The function save() expect to have a string of the name of the desired variable.
For example:
Instead of -
save(keyname ,keys);
I needed to write-
save(keyname ,'keys');

Matlab error saving containers.Map()

I try to save a map as a *.mat file which is quite big. (somewhere around 4 or 5gigs. I cannot be sure because I could never save the file...)
the map is generated by:
[amap, ~] = load_audio(config);
and saved later on by
save('audioMap', 'amap');
Now the generated file is only 218 bytes but no errors occur. Trying to read the contents of the file with whos('-file', 'audioMap.mat') results in the following error:
Warning: Unable to read some of the variables due to unknown MAT-file error.
every record of the map is a cell with 6 values. Now querying the size of the map in the Matlab workspace results in the following output:
Name Size Bytes Class Attributes
amap 2279x1 112 containers.Map
Now clearly the size is not correct but I am able to iterate through the map and all data is present. When querying the size of a record it is approximately 2.5MB.
I also tried to save the variable from the workspace with right-click and save-as with the same result.
Anyone got any ideas why Matlab is not able to properly save this map?
You where attempting to write a MAT-File version 7.0 which has a maximum variable size of 2^31 bytes=2GB
When you attempt to write Variables larger than the limit, the expected behaviour would be to receive a warning when saving the variable.
Warning: Variable 'varname' cannot be saved to a MAT-file whose version is older than 7.3. To save this variable, use the -v7.3 switch. Skipping...
For some reason the warning was not raised, but beeing unable to write such large objects is the expected behaviour.

Matlab radar/spider plots

I need to make a radar plot, I googled it and got this: http://www.mathworks.co.uk/matlabcentral/fileexchange/33134-radar-plot/content/radarPlot.m
but it gives an error I'm not sure how to solve.
The error is Error: File: radarplottest.m Line: 17 Column: 1
Function definitions are not permitted in this context.
Any tips?
Did you copy the function and paste it into a script file you were working on?
If you did something like add your own code at the top of the file (say, to load data), that will give you the error you're seeing. You should have one file, "radarPlot.m", which contains this function, and then "radarplottest.m" could be something like a script containing data loading/pre-processing and then calling the radarPlot function on the appropriate data.
All you need in radarplottest.m is something like:
Data = % define some random test data or load some existing data
radarPlot(Data); % requires radarPlot.m to be on your path so Matlab can find it