Export report to excel

Hello We export some information from Navision to Excel and then we want to hide automatically some collums because the information in those collums shouldn’t be shown to our customers. After that we would like to modify the sheet so that only one collum can be changed by the receiver(because of importing it in Navision.) Does anyone know how to fix these two items in the report of Navision ? Thank you very much !!

Hi

quote:


Originally posted by lieferink
Hello We export some information from Navision to Excel and then we want to hide automatically some collums because the information in those collums shouldn’t be shown to our customers. After that we would like to modify the sheet so that only one collum can be changed by the receiver(because of importing it in Navision.) Does anyone know how to fix these two items in the report of Navision ? Thank you very much !!


Try this: //hide column B xlrange:= xlSheet.Range('B:B'); xlRange.EntireColumn.Hidden(True); //Unlock column A xlrange:= xlSheet.Range('A:A'); xlRange.Locked(False); xlrange:= xlSheet.Range('A1'); //Protect entire sheet xlSheet.Protect('YourPassWord',True,True,True); As always: without testing it [;)]. bye André

Hello to all… I have a question as a beginner with navision reports. Is it possible to export a report to excel? How can I do it? Best Regards Barbara [?]

Barbara, you can “export” a report to Excel by saving it as HTML and opening the HTML file in Excel. However, the result of this import is not too satisfying, to put it politely [xx(] The method of choice is using C/AL code to send the data directly from the Navision report to Excel using COM Automation. A little search in the forum archives will give you dozens of postings on this topic. If you have any specific questions, feel free to ask [8D]