简体   繁体   中英

Saving data in Excel in different sheets of a workbook

I am trying to export data from a data window and I want that data to come into different spreadsheets in one Excel file according to criteria in one specific column. For example, if the name in Name column is John, that row's data should come in sheet1, if the Name is David, then that should come in sheet2.

Is there a way to do this?

I don't think this can be done in a single operation. You'll need 2 separate steps:

  1. Import your data to a staging worksheet (or external file, etc)
  2. Separate the data into appropriate worksheets once the data are staged

Or

  1. Import the full dataset into both sheets
  2. Filter out the undesirables from each sheet

This assumes you don't have control over your data source, ie you can't narrow the source query using SQL or a web service, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM