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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to break READEXCEL function if the line is too long

PM_5157504
3-Newcomer

How to break READEXCEL function if the line is too long

1 ) Apparently, there is no substitute for copying and pasting a block of Excel cells in Prime as we could do in MathCAD 15.

2 ) This has forced me to use READEXCEL but unless I shorten all of the file names and work sheet names (in the READEXCEL function), the line runs off the right side of the printable area. I tried inserting a line break (Ctrl+Shift) but that didn't do anything inside the READEXCEL function.

 

Is there a way to break up the READEXCEL function at the comma? I don't want to rename files as that will make documentation less meaningful. I shortened the path to ".\" but the line is still too long.

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:PM_5157504)

Have you tried defining each element of the workbook name and worksheet name as string variables and using concat to build the longer, complete terms?  

 

For example:

 

2024 09 14 A.png

 

You can break the path, etc names up into as many substrings as is convenient to read in your worksheet.

 

Stuart

View solution in original post

6 REPLIES 6
StuartBruff
23-Emerald III
(To:PM_5157504)

Have you tried defining each element of the workbook name and worksheet name as string variables and using concat to build the longer, complete terms?  

 

For example:

 

2024 09 14 A.png

 

You can break the path, etc names up into as many substrings as is convenient to read in your worksheet.

 

Stuart

Thanks, that worked perfectly.

Werner_E
25-Diamond I
(To:PM_5157504)

The page overhang of your READEXCEL command is not that large.

So you could help yourself either by predefining the path and filename in a variable and use that in the READEXCEL command and/or by choosing a smaller font size for this one command.

StuartBruff
23-Emerald III
(To:Werner_E)

And/or do what I did and use Landscape and Draft modes.

 

I suppose it's only really a problem if the Mathcad worksheet needs to be printed such that a reader can read the text without a magnifying glass.   <said in my favourite geriatric voice (think Methusalix from Asterix)> "Of course, back in my day, we could print out the right-hand pages.  None of this non-printing Draft mode nonsense, young fella, me lad."

Hi @PM_5157504,


I wanted to see if you got the help you needed.


If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.


Of course, if you have more to share on your issue, please pursue the conversation.

Thanks,

Catalina
PTC Community Moderator

Sorry, I neglected to mark the response as Accepted Solution. My bad.

Announcements

Top Tags