Answer the question
In order to leave comments, you need to log in
Set Excel document name via Qt Creator?
QString nameExc = ui->name_excel_file->text(); //считывание названия файла которое мы вводим
QAxObject* excel = new QAxObject("Excel.Application");
QAxObject *workbooks = excel->querySubObject( "Workbooks" );
QAxObject *shab = workbooks->querySubObject("Add()", "C:\\q\\"+nameExc+".xlsx");
QAxObject *mSheets = shab->querySubObject("Sheets");
QAxObject *StatSheet = mSheets->querySubObject("Item(const QVariant&)",QVariant("Лист1") );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question