Unfortunately SSIS does not have any component to make the formatting of excel file. It can only read\write data to\from excel file. To make the excel table formatting you would need to use a programming language like C# to do that, which you can use in script task.
Here we are getting the first sheet from excel file. // Get the first worksheet Microsoft.Office.Interop.Excel.Worksheet worksheet = (Microsoft.Office.Interop.Excel.Worksheet)workbook.Worksheets[1]; I think if we have multiple excel sheets, then we can just loop through each excel sheet and do the same thing for every sheet. Need to test it more, but it should be doable if we can do it for one sheet.
Its very useful man, same requirement came in my project. Thanks
I am so happy that it helped you in someway.
perfect
Thank you.
Is their any way to get the same task done without using the script task?
Sorry I am not aware about any other method. There are very minor chances that it can be done by some other method.
How to export data in excel table formatting using SSIS, with colourful header and border
Unfortunately SSIS does not have any component to make the formatting of excel file. It can only read\write data to\from excel file. To make the excel table formatting you would need to use a programming language like C# to do that, which you can use in script task.
Request to you please make a video on excel formatting through script task
If Excel has multiple tabs, then how to define column name.
Here we are getting the first sheet from excel file.
// Get the first worksheet
Microsoft.Office.Interop.Excel.Worksheet worksheet = (Microsoft.Office.Interop.Excel.Worksheet)workbook.Worksheets[1];
I think if we have multiple excel sheets, then we can just loop through each excel sheet and do the same thing for every sheet. Need to test it more, but it should be doable if we can do it for one sheet.
😱
What happened ?
@@learnssis Estoy emocionado de encontrar esto 🤭😅
@@enriqueruiz320 Guau bueno. Muchas gracias.