How to export all cut list to one or several excel sheet

Hello, I do have 50+ drawing sheet with cut list corresponding to different frame configuration.
Some beams on this configuration are the same and I need to get all cut list exported to an excel sheet to be able to consolidate the quantity by lenght.

Can solidworks export all cut list from one drawing but with different drawing sheet (one sheet per conffiguration) ?
Thanks.

Accepted answer

Step 1: Prepare the Cut Lists
Open Your Drawing: Start by opening your SolidWorks drawing that contains multiple sheets.
Check Cut Lists: Ensure that each sheet has an updated and accurate cut list for its respective configuration.
Step 2: Export Individual Cut Lists
Activate Each Sheet: Go through each sheet in your drawing. You can switch sheets by selecting the tabs at the bottom of the SolidWorks window.
Save Cut List as Excel:
Right-click on the cut list table in the drawing sheet.
Select Save As.
Choose Excel (*.xls) from the file type dropdown menu.
Save the file with a name that identifies the configuration or sheet.
Step 3: Consolidate Cut Lists
Once you have exported the cut lists from each sheet into separate Excel files, you need to consolidate them into a single Excel file.

Open All Excel Files: Open all the Excel files you exported.
Create a Master Excel File: Create a new Excel file that will serve as your consolidated cut list.
Copy and Paste: Copy the cut list data from each individual Excel file and paste it into the master file.
Organize Data: Ensure that the data from each cut list is organized properly. You may want to add a column indicating the configuration or sheet from which the data came.
Step 4: Use Excel to Consolidate Quantities
Combine Data: Use Excel’s data manipulation features to combine and consolidate the quantities of beams by length.
Sort and Filter: Sort the data by beam type and length.
Sum Quantities: Use the SUMIF or SUMIFS functions to sum the quantities of beams with the same length.
Automation Option
For a more automated approach, you can consider using SolidWorks macros or third-party tools to automate the extraction and consolidation process.

SolidWorks Macro:

Create a macro that loops through each sheet, extracts the cut list, and appends it to an Excel file.
This requires knowledge of SolidWorks API and VBA (Visual Basic for Applications).
Third-Party Tools:

There are third-party tools and add-ins available for SolidWorks that can help automate the extraction and consolidation of cut lists. Tools like "CustomTools" or "SolidWorks PDM" offer advanced data management features.


2 Other answers

Example of a Simple Macro
Here is a simple example of what a macro might look like:

Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDrawing As SldWorks.DrawingDoc
Dim swSheet As SldWorks.Sheet
Dim swView As SldWorks.View
Dim swTable As SldWorks.TableAnnotation
Dim swTableAnnotation As SldWorks.TableAnnotation
Dim fileName As String
Dim sheetNames As Variant
Dim i As Integer

Sub ExportCutLists()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
If swModel Is Nothing Then Exit Sub
If swModel.GetType <> swDocDRAWING Then Exit Sub

Set swDrawing = swModel
sheetNames = swDrawing.GetSheetNames

For i = 0 To UBound(sheetNames)
swDrawing.ActivateSheet sheetNames(i)
Set swSheet = swDrawing.Sheet(sheetNames(i))
Set swView = swSheet.GetViews(1)

If Not swView Is Nothing Then
Set swTable = swView.GetFirstTableAnnotation
Do While Not swTable Is Nothing
If swTable.Type = swTableAnnotation_CutList Then
fileName = "C:\CutLists\" & sheetNames(i) & ".xls"
swTable.SaveAs fileName, True
End If
Set swTable = swTable.GetNext
Loop
End If
Next i
End Sub

To export all cut lists to one or several Excel sheets, use the "Export" feature in your CAD software. Select "Export Cut List" and choose Excel as the format. Specify whether you want a single sheet or multiple sheets. Save the file, and your cut lists will be exported accordingly.