Announcements
Hello,
I try to import an excel file to ax so i can get the value of specific column using this :
SysExcelCells.item(rowIdx, columnIndex).value()
Is there anyway to get the Column Name ?
*This post is locked for comments
Hi Alex,
What technology are you using to import the excel file? Data Import Export Framework or custom coding? What is the purpose of getting the Column name? Are you searching for 'A','B','C' etc or the field name on the first row?
Hi André,
I'm using the custom code and i search the field name of the first row.
I’ll explain my problem , the list of column name is setting in one form and when I import the file I have in this file two column with Amount value.(like 423.42 & 4567.66). In Excel when we change the point by comma in the value of amount ,after the import we get only for (423,42 & 4567,66) => .( 423 & 4567). Without the decimal value.This is coming when we use this function
Cellstr = this.COMVariant2Str(cells.item(rowIdx, columnIndex).value());
// convert into str from excel cell value
str comVariant2Str(COMVariant _cv, int _decimals = 0, int _characters = 0, int _separator1 = 0, int _separator2 = 0)
{
}
Here by default I have decimals = 0 but I want change this decimals to 2 for only two column.
Actualy I’m do that and it’s work but what if the order of field change in the parmeter form..
if(columnIndex == 6 || columnIndex == 7)
Cellstr = num2str(cells.item(rowIdx, columnIndex).value().double(),0,2,0,0);
Hello ,
IT's ok i 'm using this :
if(sauParmCopyPasteLines.FieldId == fieldNum(LedgerJournalTrans, AmountCurDebit)
|| sauParmCopyPasteLines.FieldId == fieldNum(LedgerJournalTrans, AmountCurCredit) )
instead of if(columnIndex == 6 || columnIndex == 7)
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.