I am fairly new to NAV (as a heads up). The two quick questions I have are related to the same project.
Using the ExcelBuffer is there a process to deal with reading a protected Excel file? Something along the lines of "ExcelBufferCover.ReadSheet(password);"
Using the ExcelBuffer what is the easiest way to make NAV's decisions case insensitive, for example "IF.... = 'Yes'" would also include 'yes', 'YES', and so on.
I appreciate any and all information.
2009 R2
0
Comments
To answer Question 2 have a look at Report: 81 "Import Budget From Excel".
There is a function 'AnalyzeData' where you will see the code you want to compare strings case insensitive by forcing it to Uppercase.
Text009 = 'G/L ACCOUNT NO'
Text010 = 'G/L Account No.'
The code is looking for a header column that includes the text 'G/L ACCOUNT NO', so "G/L ACCOUNT NO","g/l account no." or "G/L Account No." will return TRUE and Text010 will become the Heading for that Column G/L Account No.
HTH
David
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
Come to find out after altering the code to use the uppercase() function the field in excel is a Boolean field (which caused me compile errors and lead to investigation). As of now this is a non-issue, however toying around more with the uppercase() function I will definitely have uses for it in the future.