简体   繁体   中英

AnyLogic exporting dataset into excel file

I got a dataset named datasetHourly and I would like to get the data after a simulation into an excel file, how can I get this? I can copy the dataset of the first 1000 dataset but dont get more.

First be sure you are saving more than 1000 values in your dataset. In the following image you can see that I'm storing 2000 values in my dataset. The dataset will hold ONLY the LAST 2000 values, nothing else. So be careful with that.

数据集

Second, to copy the dataset values to your excelfile, assuming that you have an excel object in your model you can do this:

excelFile.writeDataSet(datasetHourly, sheetIndex, row, column);
excelFile.writeFile();

you just need to choose in which cell (row,column) and what sheet (sheetIndex) you want to copy your dataset.

And that should be all

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