License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Archicad C++ API
About Archicad add-on development using the C++ API.

APIDo_SaveID - saving to .xls from schedule

Anonymous
Not applicable
Hello
I am trying to save a interactive schedule as a .xls file using APIDo_SaveID function.
I have been able to open the interactive schedule view and now I want to be able to do a save as.

There is no excel fileTypeID to apply to the API_FileSavePars.fileTypeID structure

//code------
//save file as excel
API_FileSavePars savePara;
std::string newXcelFilename = "exportExcelTest.xls";

BNZeroMemory(&savePara, sizeof(API_FileSavePars));
savePara.fileTypeID = APIFType_TabListFile;

IO::Location folderLoc;
API_SpecFolderID specID = API_UserDocumentsFolderID;
ACAPI_Environment(APIEnv_GetSpecFolderID, &specID, &folderLoc);
savePara.file = new IO::Location(folderLoc, IO::Name(newXcelFilename.c_str()));

err = ACAPI_Automate(APIDo_SaveID, &savePara, nullptr);

I hope someone can help ...please !

Archicad 22
Dev Kit 22.3004
Windows 8
2 REPLIES 2
leilei
Enthusiast
Hi
Maybe you can look at the Do_ExportWallsToExcel function in Database_Control test .
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Using ACAPI_Automate(APIDo_SaveID,...) the content of the current window cannot be saved to Excel file.
As leilie said, you can find an example in Database_Control Example Add-On for writing Excel files. In that way you can write any data into the Excel file, but you have to collect those informations first.