Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
I created a table in Mathcad 8.0 by copy and pasting raw data (red outline in attached image) from Excel to Mathcad. Now that I have the table created in Mathcad (blue outline in attached image), I want to overwrite it with new data (orange outline in attached image). For whatever reason, copy and paste of the orange data does not seem to work when I try to paste into the blue outline. What am I doing wrong? I have tried to clear the cells in Mathcad first, to no avail.
Solved! Go to Solution.
Copy & paste is awfully broken in Prime in various aspects.
So I guess the simple way you tried was thus successfully blocked by PTC
So you simply may create a new table via copy & paste and delete the old one. Not satisfactory, I know.
A table actually is a collection of a couple of independent nx1 vectors. So what you created are three 3x1 vectors with three different variable names.
Are you sure that this is the suitable data structure you need for your further calculations?
You may use the function READEXCEL to read in the data from the external Excel sheet. Either three times to create the very three vectors you cretaed via the table or in one go by reading in the data in a matrix (a 3x3 matrix in case of your example).
If the external EXCEL sheet is static and not subject to change you may also consider embedding it by creating an Excel component and then copy the data from the external sheet to it. PTC has provided no way to embed an already existing sheet - what a shame.
Another workaround using a template file was suggested here Insert existing excel component in mathcad sheet
Once the data is in the embedded sheet you can extract any data you like to Prime vectors or matrices.
Copy & paste is awfully broken in Prime in various aspects.
So I guess the simple way you tried was thus successfully blocked by PTC
So you simply may create a new table via copy & paste and delete the old one. Not satisfactory, I know.
A table actually is a collection of a couple of independent nx1 vectors. So what you created are three 3x1 vectors with three different variable names.
Are you sure that this is the suitable data structure you need for your further calculations?
You may use the function READEXCEL to read in the data from the external Excel sheet. Either three times to create the very three vectors you cretaed via the table or in one go by reading in the data in a matrix (a 3x3 matrix in case of your example).
If the external EXCEL sheet is static and not subject to change you may also consider embedding it by creating an Excel component and then copy the data from the external sheet to it. PTC has provided no way to embed an already existing sheet - what a shame.
Another workaround using a template file was suggested here Insert existing excel component in mathcad sheet
Once the data is in the embedded sheet you can extract any data you like to Prime vectors or matrices.
@Werner_E wrote:Copy & paste is awfully broken in Prime in various aspects.
So I guess the simple way you tried was thus successfully blocked by PTC
What a shame. I was afraid of that, but thank you for confirming my suspicions.
@Werner_E wrote:Are you sure that this is the suitable data structure you need for your further calculations?
After watching countless YouTube videos last night, searching for an answer, and trying all of the things you already mentioned, it was the closest I could get to what seemed like a working solution. Lo and behold, I again hit a roadblock though.
@Werner_E wrote:You may use the function READEXCEL to read in the data from the external Excel sheet. Either three times to create the very three vectors you cretaed via the table or in one go by reading in the data in a matrix (a 3x3 matrix in case of your example).
If the external EXCEL sheet is static and not subject to change you may also consider embedding it by creating an Excel component and then copy the data from the external sheet to it. PTC has provided no way to embed an already existing sheet - what a shame.
Another workaround using a template file was suggested here Insert existing excel component in mathcad sheet
Once the data is in the embedded sheet you can extract any data you like to Prime vectors or matrices.
I'm trying to set up a clean, succinct workflow for my fellow engineers. All that should ever change is the 3x3 matrix. I had hoped to avoid the use of an external Excel file if possible and any external dependency. It just adds another unnecessary step to the workflow when all I need to do is paste one 3x3 matrix. Nevertheless, thank you for the feedback. I understand the situation and can take another route now.
One way to modify only portions of a table or matrix is to use a "Send Keystroke" app. You need an app that will allow a Down-Arrow key after every item if you want to send a column of data or a Tab key if you want to send row data.
It is most useful when your matrix/table is very large or you have lots of digits to type accurately, or even has units.
There has been user demand to add more complex matrix/table editing features, but it doesn't seem to be on PTC's horizon.
Using a tool like AutoIt or similar sure is not an easy and convenient replacement for simple copy and paste a 3x3 matrix from Excel to Prime. But its a nice idea and I guess with some work it would be possible to automate the process of transferring a couple of values from specific positions in Excel to the Prime table. But then it may be easier to use READEXCEL and then copy the matrix read in to a variable, making the data static to sheet and avoiding the necessity of distributing an external Excel sheet along with the Prime sheet.
According more complex matrix editing features - I would already be happy if PTC would get rid of the idiotic and playful way scrolling is implemented in larger matrices and create a workable way to do it. It's almost impossible to quickly manually target a specific location in a larger matrix with a few thousand entries, such as where positive values and negative values switch or similar.
Well don't just poo-poo my idea right off the bat!!!
Like I said, when you have a large table, especially with mixed units, it is easier to send the date with a keystroke app. You can't do that with simple copy & paste or with READEXCEL. I use a lot of material and equipment tables in engineering so having all kinda units is common place.
Your second point... yeah, its a slog!
@m_ridzon wrote: "All that should ever change is the 3x3 matrix" ...
So I guessed that using a keystroke app could maybe considered slightly overkill 🙂
Yes, the keystroke app is overkill. I am making a Mathcad template to share with colleagues; i.e., many other engineers will be using it. As a result, I cannot expect all of them to implement a keystroke app to carry out this simple task. By the time they figure out a keystroke app, they would have been able to manually populate the 3x3 matrix themselves. 😊
Ah... didn't see that on your other response. I mistakenly thought that was only an example matrix.