web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Open only File window

(0) ShareShare
ReportReport
Posted on by

hi guyz

i want to open only this window 

open-window.PNG

when i click the export select excel button this button is in action pane 
and there is my code 

void clicked()
{



Dialog _dialog;
DialogField _file;
ExcelSpreadsheetName XLSX;
;
//Prompt to import excel
_dialog = new Dialog("Please select the file to load");
//_dialog.addText("Select file:");
_file = _dialog.addField(ExtendedTypeStr("FilenameOpen"));
_dialog.filenameLookupFilter(["@SYS28576",XLSX,"@SYS100852","*.csv"]);
_dialog.filenameLookupTitle("Upload from EXCEL/CSV");
_dialog.run();
if (_dialog.closedOK())
{
info(_file.value() );
}

super();



}

can any buddy solve this issue 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    window name is Upload from excel/CSV

    i want open only Upload from excel/CSV  form not microsoft dynamics Ax

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    If you check the Extended Data Type FileNameOpen in the AOT that you are using as well in your code, you would notice that it has a form reference for the SysOpenFileName form.

    If you check the source code of that form, the answer is there on how to open the file name selection popup window through a Win32 API call for getOpenFileName.

    You could implement similar logic for your case, if you do not want to bind your functionality to a dialog.

  • Vilmos Kintera Profile Picture
    46,149 on at

    ^ duplicate answer, it has been suggested above. That is indeed what you should check.

  • Community Member Profile Picture
    on at

    Thanks Vilmos Kintera and  Sukrut Parab can u tell me that how to select work sheet from excel through this code

    void clicked()

    {

    boolean         _throw = true;

    container      conFilter = ["Microsoft Excel 97-2003 Worksheet (.xls)" ,"*.xlsx"];    

    Filename        filename;    

    Dialog _dialog;

    DialogField _file;

    str      strError;

    int      a=2;

    SysExcelWorksheets worksheets;

    SysExcelWorksheet worksheet;

    SysExcelWorkbooks workbooks;

    SysExcelWorkbook workbook;

    CLRObject     exc;

    CLRObject     innerExc;

    CLRObject     clrExcMessage;

    ExcelSpreadsheetName   XLSX;

    ;

    //Prompt to import excel

    _dialog = new Dialog("Please select the file to load");

    //_dialog.addText("Select file:");  Microsoft Excel Worksheet (.xlsx)

    _file = _dialog.addField(ExtendedTypeStr("FilenameOpen"));

       _dialog.filenameLookupFilter(conFilter);

    _dialog.filenameLookupFilter(["Microsoft Excel 97-2003 Worksheet (.xls)" ,"*.xlsx"]);

    _dialog.filenameLookupTitle("Upload from EXCEL/CSV");

    _dialog.run();

    if (_dialog.closedOK())

    {

    info(_file.value() );

    }

    }

    i want select also Work sheet from excel in dialogue box in lookup

    i mean first i select Excel while i select excel then the work sheet is available in lookup  

  • Vilmos Kintera Profile Picture
    46,149 on at

    Please open a new topic for a new question. Also if you want to paste code select the Rich formatting editor and use the Insert code </> tag for correct formatting.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans