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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Importing Data from Excel to Mathcad

DJNewman
17-Peridot

Importing Data from Excel to Mathcad

This PTC Mathcad Prime worksheet explores two options for importing data from an external Excel file into Mathcad. These two options are the Excel Component and the READEXCEL function .

This worksheet is partitioned into two sections. Within each section, we will calculate the surface area of a threaded bolt for electro-plating using data imported using the two options mentioned above. Please note that this is not intended to be an in-depth tutorial, and therefore won't provide details on every mouse click and keyboard entry. There are examples available in the Help Center, so if you find yourself needing a little extra explanation, that will be a great place to start. Direct links to specific features will be added in this document to help you find more information on that specific topic.

 

This Mathcad worksheet was made in Mathcad Prime 7 and then updated to Mathcad Prime 9, and uses Mathcad premium functionality. The .zip includes the Mathcad worksheet and an Excel spreadsheet that should be saved in the same directory.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
5 REPLIES 5

For the record I have found that excel components can corrupt the MathCAD file, making it unable to be opened. I don't know if this has been solved in Prime7, but it was a problem in Prime 3.5.  I prefer to use excel component only for generating outputs, and READEXCEL for reading inputs. 

 

I encountered this problem when I was trying to store large data tables as excel components. 

And what version of MS Excel did you use?

I don't know - it was on an old computer that I no longer have access to. 

 

The size of one table was 72 rows x 49 columns and another was 80 x 20, but I think that I also had more tables, and the excel components had formatting. Formatting takes up a lot of unnecessary memory. 

 

Excel component is still handier than the new Combo Box feature, though.

HS_10206423
5-Regular Member
(To:DJNewman)


@DJNewman wrote:

This PTC Mathcad Prime worksheet explores two options for importing data from an external Excel file into Mathcad. These two options are the Excel Component and the READEXCEL function .

This worksheet is partitioned into two sections. Within each section, we will calculate the surface area of a threaded bolt for electro-plating using data imported using the two options mentioned above. Please note that this is not intended to be an in-depth tutorial, and therefore won't provide details on every mouse click and keyboard entry. There are examples available in the Help Center, so if you find yourself needing a little extra explanation, that will be a great place to start. Direct links to specific features will be added in this document to help you find more information on that specific topic.

 

This Mathcad worksheet was made in Mathcad Prime 7 and uses Mathcad premium functionality. The .zip includes the Mathcad worksheet and an Excel spreadsheet that should be saved in the same directory.


I use newer Excel with extension xlsx. I will try with xls extension then.

What you said means that I can not use excel file as data source with more than one worksheet and if I even use it will always take primary one?

Hello,

I'm not sure how you reached that conclusion? The Excel file included in the .zip with the tutorial worksheet is, in fact, an .xlsx file. (The .zip contains thread.xlsx and Importing Data from Excel.mcdx ).

 

If you want multiple Excel sheets embedded, then just make multiple Excel components in the same Mathcad worksheet. I think that's what you're getting at?

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Top Tags