Hi,
I have a problem importing files from excel, when the cell contents "800 3/4" as a raw material code, the result is loaded as 800.75.
I am using:
VO through Excel.Application.
.NET Interop.
.NET Devexpress worksheet.
Excel ole connection.
All of them import 800.75.
The problem is solved if the user use the apostrophe as a prefix; but we want to keep the process with no modification by the user.
TIA,
Oscar Hernandez
Loading info using interop
-
- Posts: 28
- Joined: Tue Nov 17, 2015 4:12 pm
Loading info using interop
Oscar,
Can you show us some code?
Which property of the cell are you reading ?
Robert
Can you show us some code?
Which property of the cell are you reading ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Loading info using interop
I think that's just a "feature" of Excel, it tries to be too "smart" about it. Isn't there a way to query the contents of the cell as text format only?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Loading info using interop
Chris,
There is a Formula property that returns the contents of a cell as string
Robert
There is a Formula property that returns the contents of a cell as string
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 28
- Joined: Tue Nov 17, 2015 4:12 pm
Loading info using interop
Robert, Chris,
Thanks for the tip, looking for properties like Formula, we found displaytext that did the work.
We will change from a massive way to import into cell by cell using displaytext for the fields that expect string.
Thanks for the tip, looking for properties like Formula, we found displaytext that did the work.
We will change from a massive way to import into cell by cell using displaytext for the fields that expect string.