cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

string cut off at 255 when importing from Excel

evgen-disabled
1-Newbie

string cut off at 255 when importing from Excel

I am trying to parse an Excel worksheet consisting of string values into
Mathcad table, and I discovered that if string
in Excell cell exceeds 255, it is getting cut-off
at 255 characters.

Is there any way around this limitation?

Regards,
Yevgen
8 REPLIES 8

I do not see this restriction. It may be due to the particular way you are obtaining the values. I've inserted (in MC11) an Excel component. Within that I use rept to repeat an input string 100 times. When I output that I get correct strings of length 300 or 400 (for three and four character inputs).
__________________
� � � � Tom Gutman

Maybe it is a limitation of Mathcad 14 that
I am using?
There is nothing obviously abnormal about the string, and Mathcad cuts it exactly at 255 regardless of content (I tried changing it).

Particular string in question is attached in xls.

On 1/21/2009 10:32:44 AM, evgen wrote:
== There is nothing obviously abnormal about the string, and Mathcad cuts it exactly at 255 regardless of content (I tried changing it).

I've seen this in other applications that have copied Excel data. It even happens in Excel 2000 itself, selecting a number of cells, copying them and pasting to a new sheet will truncate long string; however, Paste Special as Text will copy the entire string. Given that it happens with many different applications, I'm reluctant to think of it as a "Mathcad" problem.

Stuart

It would be peculiar kind of Excel problem if
it does not exhibit itself in Mathcad 11 but does
in Mathcad 14...
Maybe the way how Excel worksheets are read by Mathcad was changed?

What you are doing is not very wise either !

How many TNR characters can you plug in a readable line of text ? Try it and that will tell you the 255 is abusive. Around 100 characters is a very long line of text. 255 will overflow the Mathcad margin and of no use as the reader must resize. What does not fit in a 17" screen is a nonsense.

jmG

On 1/21/2009 2:52:10 PM, jmG wrote:
== What you are doing is not very wise either !

Well that rather depends upon what you want to do with the string - I've loaded a few that are several thousand characters long.

== How many TNR characters can you plug in a readable line of text ? Try it and that will tell you the 255 is abusive. Around 100 characters is a very long line of text. 255 will overflow the Mathcad margin and of no use as the reader must resize. What does not fit in a 17" screen is a nonsense.

For example, the attached file loads in the Excel file (you may have to play around with the location) and then parses the string to produce a table of products.

Stuart

On 1/21/2009 3:24:24 PM, stuartafbruff wrote:
>For example, the attached file loads in the Excel file

Forgot to mention, works in both my M11 and M14.

Stuart


Excel sheets are "read" in a variety of ways. The limitation may be in the way you have set up your sheet. Since you haven't posted your worksheet, it's rather difficult to diagnose why it doesn't work.

IAC, it's not a limitation of either Excel nor Mathcad, copying your Excel file into an Excel component in MC14 extracts the entire string, 546 characters.
__________________
� � � � Tom Gutman
Top Tags