Query and Insert Data from Excel Sheet: CP_EXCELQUERY – CADPower Command
Summary The CP_EXCELQUERY command in CADPower is a versatile, multi-purpose tool that enables users to read data from XLSX files, query it using logical conditions, and insert the retrieved information into CAD drawings. The data can be displayed as tables, MTEXT, or attributed blocks, allowing for flexible and dynamic integration of spreadsheet information into design files. This command is compatible with industry-leading CAD platforms like BricsCAD, AutoCAD, ZWCAD, and ARES Commander, making it a crucial tool for CAD professionals who frequently work with Excel data. CADPower -> CADPower Object Table Data Tools -> CADPower Object Table Data Tools -> Query and Insert data from Excel sheet Key features include: Read Data Directly from XLSX Files:Access spreadsheet data without exporting it to intermediate formats. Practical Applications: Step-by-Step Workflow: Example Use Case: The use-case for this: What is the problem it solves? You have an Excel sheet and you have a CAD drawing. You need to match the content in the Excel sheet based on your CAD data and pull out relevant information. This command has the solution. There are two sets of information that you need to specify in this main dialog box. The first set pertains to the XLSX workbook name and the SheetName where you need to look for the data. Next, you need to specify the rows and columns you want to search. The first item in this list is the location of the Title row: usually Excel sheets have the title info specified in one of the rows. You need to specify that row number here. In the Search Column and Search Row sections, you need to specify a row or column name that you want to quick-search. The results are displayed instantly in a popup window opened by the Show buttons and copied to clipboard and/or placed as MTEXT or attributes block on the drawing. There is a Search Cell option also to retrieve the value of a single cell. The TitleRow Info from the Excel sheet The results of a queried column The results of a query from XLSX displayed as table in CAD The next section is called Data Feeders where you can get CAD data from selected object(s) or enter your own independent search data. Data from your drawing can either come from an AutoCAD Map Object table, CADPower object data or from inherent CAD properties like Length, Area, block attribute, text value, radius, elevation, color, rotation angle etc. The complete list of CAD properties that you can use are shown in the image below: CAD properties that can be queried from XLSX The next set of information you need to provide is about the CAD entity that you want to use for query. Clicking on the Select button allows you to pick an entity that will offer its internal CAD properties or attached object table or attribute data for query. You need to make the right selections from the Data Feeders and get the property value that you want to query. You can also specify logical operators on the data and perform the query based on whether you want an exact match, less than or greater than or not equal to the value (for integer and real values). For string values, you can search based on their case, or even partial search and so on. All the search conditions you specify here will be taken into consideration when searching the XLSX data. Excel data read in and displayed as table Excel data read in and displayed as MTEXT