Right now I am trying to copy a chart from an excel worksheet and paste it into a drawing, but I'm having issues with resizing, positioning, and getting/inserting the chart from excel and into solidworks. Thank you in advance!
Do you mean a table?
If you insert a table from Insert > Tables > General Table for the same column and rows you can just copy and paste the information as needed.
I did not mean a table I meant a chart.
Can provide more of an example of what you're trying to achieve?
Maybe a sample, drawing and chart, etc?
I have a collection of excel workbooks with specifications about a different part. Basically I am taking the following chart (that is different depending on the excel workbook), and inserting it into a solidworks drawing about the part. I want this done through VBA macro so that it is automated. I am currently trying to export the excel chart as a png through solidworks VBA:
xlSheet.ChartObjects(1) _ .Chart.Export _ fileName:="S:\Engineering Team\-FolderName-\SolidWorks\Active Chart\Chart.png"
However, whenever I do this I get an error that says, "Chart.png it looks like we don't support this file format."
Save the chart as a bitmap and than insert it.
This did not work, it still gave me the same error: "Chart.bmp it looks like we don't support this file format."
Don't know how to create a macro for this but you can;
From the main ribbon Go -Insert - object and then pick your excel spread sheet and have it linked (so it updates).
Could you please go into a little more detail about how to insert the excel chart?
Do an insert object, browse to the excel file, check box to Link if you want it to update. It should work.
This did work, however, it inserted the entire worksheet. I only want the chart.
You can edit what you inserted. Have you worked with excel and edit excel work sheets?
I work with excel a lot, however, I rarely work in Solidworks and do not know how I would take the chart from the rest of the sheet.
I've got a excel book with many sheets. On the sheets with charts that I need I select the chart in excel, ctrl+c, move to my drawing and ctrl+v. This works but the charts tend to distort after closing and reopening the drawing.
If I insert object from file I am unclear how I chose which chart within the excel book that I'm looking for in that instance.
Retrieving data ...