ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Data loss when importing from excel
Hello,
I seem to lose data when I read an excel sheet into a table. i.e. a value in a cell of excel is 0.00000462. After reading the table into excel, the value is 0.00 even if I increase the number precision to 10. Is there a way to prevent this loss? Esther |
The Following User Says Thank You to Esther Bennett For This Useful Post: | ||
Carsten Seehafer (07-03-2014) |
#2
|
||||
|
||||
Hello Esther,
I've tried 3 import options: - import with flexsim commands -> correct behavior - import with excel import interface and data distinction automatic -> numbers are rounded at the 6th decimal place - import with excel import interface and data distinction numeric -> correct behavior Maybe this is a little help |
The Following 6 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Tom David (07-07-2014) |
#5
|
|||
|
|||
@Matt I am using Flexsim 7.1.4 32 bit version on a windows 7 64 bit machine. I will try the first option of Carsten later today and let you know if this works for me, the third option is not applicable for me, because I have (large) tables with both string and numeric columns.
I managed to read in a specific number the way Carsten did. Only we have very large table to import, so reading in separate numbers (and strings) is not really an option. Esther Last edited by Esther Bennett; 07-04-2014 at 09:06 AM. |
#6
|
|||
|
|||
Using FlexSim 7.1.4 32-bit on a 64-bit machine, I was able to reproduce the issue and solve it.
When doing Automatic Data Distinction, the Excel Importer reads in all data as a string taking in to account Excel's cell format. So FlexSim now imports what you see in Excel, rather than the data Excel stores behind the scenes. This means the cell must be formatted correctly in order for FlexSim to read in the data as you want it to. Reading the cell format is a change from previous versions of FlexSim that now allows you to properly import dates as strings rather than as numbers. In order to properly import your number data in this case, you need to increase the precision of the cell's with long numbers in them. This can be done by selecting the cells and clicking the Increase Decimal button found under the Number Format box in the main toolbar. This of course is not an issue when using Numeric Data Distinction as all data is read in as a number. |
The Following 8 Users Say Thank You to Matt Long For This Useful Post: | ||
Tom David (07-08-2014) |
#7
|
|||
|
|||
We're going to make a change in version 7.3 (being released within the next month) that will address this change in the Automatic Data Distinction. The importer will still import all data in a string, and then check to see if it's a number or a string as previously described. However, if it finds that the imported value is a number, it will reimport the value from Excel as a number. This will give you the full precision of the number without the need to increase the decimal precision of each cell.
|
The Following 7 Users Say Thank You to Matt Long For This Useful Post: | ||
Tom David (07-09-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
Importing Timetables/Shift Patterns into Flexsim from Excel | Daniel Braund | Q&A | 2 | 08-19-2011 03:00 AM |
How to export model data to excel? | zhang xin | Container Terminal (CT) Library | 3 | 04-16-2011 01:21 AM |
Excel Data Import | Sung Kim | Q&A | 2 | 07-16-2010 10:41 AM |
Excel File Importing | John Kim | Container Terminal (CT) Library | 0 | 08-06-2009 03:21 PM |
Problem with importing Excel data | David Chan | Q&A | 5 | 03-05-2009 01:49 AM |