Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

get all sheets name of selected excel from dialogue box in lookup in Ax 2012

$
0
0

I have tried this code so far which is selecting excel sheet. Now I want the names of sheet inside the excel, How to achieve this?

void clicked()
{



container conFilter = ["Microsoft Excel 97-2003 Worksheet (.xls)" ,"*.xlsx"];
Dialog _dialog;
DialogField _file;
ExcelSpreadsheetName XLSX;
SysExcelWorksheet worksheet;


boolean fileExists;
;
//Prompt to import excel

_dialog = new Dialog("Please select the file to load");
//_dialog.addText("Select file:");
_file = _dialog.addField(ExtendedTypeStr("FilenameOpen"));

_dialog.filenameLookupFilter(conFilter);
_dialog.filenameLookupFilter(["Microsoft Excel 97-2003 Worksheet (.xls)" ,"*.xlsx"]);
_dialog.filenameLookupTitle("Upload from EXCEL/CSV");


// _dialog.filenameLookupInitialPath('worksheet');
_dialog.run();
if (_dialog.closedOK())
{
info(_file.value() );

}

super();
}


Any help would be appreciated.


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>