The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Read Excel changes integer to integer
CharlieFirpo
Member Posts: 48 Contributor II
Dear All!
A have an excel table with a column that has text and number values as well. The first row of this column is the name (it is a text) of the RapidMiner attribute. The second row in excel is also a text. The third, fourth... are numbers, integers, like 1 2 3. These numbers are not 1.0 2.0 3.0. But when I use the Read Excel operator, RapidMiner changes these 1 2 3 numbers into 1.0 2.0 3.0. Why? How can I change them back? Using Real to Integer operator does not work, because this attribute has text value as well.
If I use Read CSV (reading a .csv with the same content), then during the read of the csv (using the Import Configuration Wizard), these 1 2 3 numbers are not change into 1.0 2.0 3.0. So reading csv is correct. I could use this operator, but it has a disadvantage. I can not set the Imported cell range. In Read Excel operator, there is a parameter to set the imported cell range.
So what is the solution? Read CSV or Read Excel operators do not read the tables automaticully. If I create a new (next) column in the csv or xls using not the RapidMiner, and after that I run my RapidMiner process, it will not see my new column. Why? Why the Read operators do not read the entire tables at every run of the process? They read only the actual values of the cell range set at first use of the Read operator.
Using Read Excel, I can set a large imported cell range, so if I create a new column or row in the table, the RapidMiner process will read the new column or row. But I'm not able to set the imported cell range at Read CSV.
But using Read Excel, my 1 2 3 numbers change into 1.0 2.0 3.0.
Is there any solution for my problem? I want a huge (not known) imported cell range, and I want my number in the format 1 2 3, not 1.0 2.0 3.0.
Thank you reading this and trying to help me!
A have an excel table with a column that has text and number values as well. The first row of this column is the name (it is a text) of the RapidMiner attribute. The second row in excel is also a text. The third, fourth... are numbers, integers, like 1 2 3. These numbers are not 1.0 2.0 3.0. But when I use the Read Excel operator, RapidMiner changes these 1 2 3 numbers into 1.0 2.0 3.0. Why? How can I change them back? Using Real to Integer operator does not work, because this attribute has text value as well.
If I use Read CSV (reading a .csv with the same content), then during the read of the csv (using the Import Configuration Wizard), these 1 2 3 numbers are not change into 1.0 2.0 3.0. So reading csv is correct. I could use this operator, but it has a disadvantage. I can not set the Imported cell range. In Read Excel operator, there is a parameter to set the imported cell range.
So what is the solution? Read CSV or Read Excel operators do not read the tables automaticully. If I create a new (next) column in the csv or xls using not the RapidMiner, and after that I run my RapidMiner process, it will not see my new column. Why? Why the Read operators do not read the entire tables at every run of the process? They read only the actual values of the cell range set at first use of the Read operator.
Using Read Excel, I can set a large imported cell range, so if I create a new column or row in the table, the RapidMiner process will read the new column or row. But I'm not able to set the imported cell range at Read CSV.
But using Read Excel, my 1 2 3 numbers change into 1.0 2.0 3.0.
Is there any solution for my problem? I want a huge (not known) imported cell range, and I want my number in the format 1 2 3, not 1.0 2.0 3.0.
Thank you reading this and trying to help me!
Tagged:
0
Answers
But the read operators do not read the new columns. Neither Read Excel if one set a huge imported cell range. It does not work. There are the 'data set meta data information' at both read operators, and here needed to add the new columns. But to add a huge number of columns does not work, because if an added column does not exist in the table, then the read operators will throw a failure message.
So if one does not know the exact size of a table (the exact number of the columns), and the number of the columns can change by the time, it is necessary to use the Import Configuration Wizard if the number of the columns change or set the correct 'data set meta data information' manually.
Nice day!
It is possible, but unfortunately I can't recall exactly how.
I would have suggested using the Read Excel With Format operator & the using a regular expression to remove the formatting information, but it seems this is not working on my test. I think it is something like this that should work though.
Good luck!