fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Loading info using interop

Loading info using interop 2 weeks 4 days ago #10471

  ohernandez@sistemas-liasa.com's Avatar Topic Author Offline Posts: 25
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

Please Log in or Create an account to join the conversation.

Loading info using interop 2 weeks 4 days ago #10479

  robert's Avatar robert Offline Posts: 1158
Oscar,
Can you show us some code?
Which property of the cell are you reading ?

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

Loading info using interop 2 weeks 4 days ago #10481

  Chris's Avatar Chris Offline Posts: 1341
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?
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Loading info using interop 2 weeks 4 days ago #10482

  robert's Avatar robert Offline Posts: 1158
Chris,
There is a Formula property that returns the contents of a cell as string

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

Loading info using interop 2 weeks 3 days ago #10488

  ohernandez@sistemas-liasa.com's Avatar Topic Author Offline Posts: 25
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.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1