Error while converting a .mat file into csv file [closed] - excel

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have used :
load('feature_table.mat');
csvwrite('ft.csv',feature_table);
But it shows following error. How can I solve this?
Check for missing argument or incorrect argument data type in call to
function 'real'.
Error in csvwrite (line 47)
throw(e)
More information about the file: The feature_table is a 3240x26 table

I'm not sure what the problem is, but Matlab recommends to use the "writematrix" function instead. See https://se.mathworks.com/help/matlab/ref/writematrix.html
You could also try saving the table as a .txt file, that is the output the Matlab website uses in their example of the csvwrite function (https://se.mathworks.com/help/matlab/ref/csvwrite.html).

Related

VBA Can't Assign to read-only property error [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
I am having an vba errror - can't assgin to read-only propery - which is triggered at the finding of this code below by the compile error:
ProductCode = ""
I have gone on performing some isolation test and trying to find out what's actually causingt this error with belo actions:
1 - on a seperate module (new), i created a dummy subroutine with above code only, and then pressed Compile VBA project, the error message is triggered
2 While composing above dummy subroutine, as i typed out the word productcode - it is automatically capitalised as ProductCode - I tried to search (ctrl + F) this word throughout all VBAproject suspecting there might be a already declared term of such and therefore triggering the error - but found no matching of such.
3 in the same dummy subroutine i tried to declare the ProductCode as string, and then pressed Compile to check, no error message !
Could someone please shed some light on this?
I am using Excel 365 corporate edition

Regex version number out of package names [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 months ago.
Improve this question
I have a folder with a bunch of packages, each with their version in their name. Im trying to use regex to create a list with those versions to be used later.
Some examples:
Input:
libpci-dev_3.5.2-1_amd64.deb
libpcre3-dev_8.39-12_amd64.deb
libaprutil1-ldap_1.6.1-4_amd64.deb
nftables_0.9.6-1~bpo10+1_amd64.deb
libkdb5-9_1.17-3+deb10u3_amd64.deb
libc-dev-bin_2.28-10+deb10u1_amd64.deb
libboost-locale1.67.0_1.67.0-13+deb10u1_amd64.deb
I want to delete the front of the package name as well all the amd64 and .deb as well as the _ or - surrounding the versions and then just leave the version of the package in the list
Expected output:
3.5.2-1
8.39-12
1.6.1-4
0.9.6-1~bpo10+1
9_1.17-3+deb10u3
2.28-10+deb10u1
1.67.0_1.67.0-13+deb10u1
I managed to select only the numbers, but im having issues with the last examples, where there is also letters involved
Versions are started after _, so 9_1.17-3+deb10u3 should be 1.17-3+deb10u3, and you can extract those using the following regex.
_(.*)_amd64\.deb
Python Example
import re
packages = """libpci-dev_3.5.2-1_amd64.deb
libpcre3-dev_8.39-12_amd64.deb
libaprutil1-ldap_1.6.1-4_amd64.deb
nftables_0.9.6-1~bpo10+1_amd64.deb
libkdb5-9_1.17-3+deb10u3_amd64.deb
libc-dev-bin_2.28-10+deb10u1_amd64.deb
libboost-locale1.67.0_1.67.0-13+deb10u1_amd64.deb"""
versions = re.findall(r"_(.*)_amd64\.deb", packages)
print(*versions, sep="\n")
OUTPUT
3.5.2-1
8.39-12
1.6.1-4
0.9.6-1~bpo10+1
1.17-3+deb10u3
2.28-10+deb10u1
1.67.0-13+deb10u1

I am unable to open the excel file with pandas, [duplicate]

This question already has answers here:
Reading/parsing Excel (xls) files with Python [closed]
(13 answers)
Closed 9 months ago.
it displays the following error
this is the error
well i have already tried with diffrent file but it doesnt work
data1=pd.read_excel('second.xlsx',sheet_name="Sheet1")
have you tried passing engine="openpyxl" argument?
P.S this is where I found the answer https://stackoverflow.com/a/50815107

How to run 100 csv File in script file from a folder (One file at once)? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I have to run the below script code for multiple files from a folder, one at once, I have change CSV file name at every iteration, file names are like D8.csv, D16.csv etc.
java -Xmx10G -jar dist/wikifier-3.0-jar-with-dependencies.jar -annotateData data/Splited_WikiQA_dev/**D8.csv** data/output_Splited_WikiQA_dev/ false configs/STAND_ALONE_NO_INFERENCE.xml
Use a for loop that processes all the files matching a wildcard.
for file in data/Splited_WikiQA_dev/*.csv
do
java -Xmx10G -jar dist/wikifier-3.0-jar-with-dependencies.jar -annotateData "$file" data/output_Splited_WikiQA_dev/ false configs/STAND_ALONE_NO_INFERENCE.xml
done

Best way of transferring Excel to ABAP and vice versa [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
What is the latest way to export and import data to/from Excel from SAP ABAP? I used some old OLE libraries but they have some limitations. One other thing I found was the SOFFICEINTEGRATION package, but that looks like was developed in the early 00's. Are there any new developments or should I just stick with OLE or SOFFICEINTEGRATION?
As far as I know, the official SAP solution is the two you described above. However there is abap2xlsx, as a freeware. This has to be implemented separately in your system (probably someone responsible in your company won't agree, implementing "random" stuff in productive business system). You can read more about it here:
https://wiki.scn.sap.com/wiki/display/ABAP/abap2xlsx
(I used it only once, creating an xlsx file and worked very well.)
Share some of my experience about Excel handling in ABAP.
1.Excel download from internal table.
data:
lo_table type ref to cl_salv_table,
lx_xml type xstring.
try.
cl_salv_table=>factory(
importing
r_salv_table = lo_table
changing
t_table = lt_data ). "lt_data is your internal table
catch cx_salv_msg.
endtry.
lx_xml = lo_table->to_xml( xml_type = '10' ). "XLSX
call function 'XML_EXPORT_DIALOG'
exporting
i_xml = lx_xml
i_default_extension = 'XLSX'
i_initial_directory = ''
i_default_file_name = 'export.XLSX'
i_mask = 'Excel (*.XLSX)|*.XLSX'
exceptions
application_not_executable = 1
others = 2.
2.Excel upload to internal table.
Function module ALSM_EXCEL_TO_INTERNAL_TABLE. See the example link here.

Resources