This sample data:
This data was not previously in the project folder, but it appears after the process has successfully run.
For example header to be:
for activity in Project
This sample data:
This data was not previously in the project folder, but it appears after the process has successfully run.
For example header to be:
for activity in Project
Use the below Macros code to make A1:F1
bold. Place the Invoke VBA acitvity after the first Set Range Color activity:
Sub BoldHeaders()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1") ' Change "Sheet1" to your sheet's name
With ws.Range("A1:F1").Font
.Bold = True
End With
End Sub
Properties of Invoke VBA
Text file path:
Macos Code.txt (211 Bytes)
Hope it helps!!
Make sure that Macros is enabled. If not follow the below steps from the thread.
Regards
After uodate VBA Marcos
Uploading: image.png…
I’m sorry that I’m not able to see the screenshot. Make sure to pass the sheet name that you have in your excel and you are good to go.
Regards
Whynot simply use a blank template with headers
So that you can just write the data and everything looks as you need
Cheers
You can use Invoke code approach which don’t have dependency on Macro settings which most of the organizations are scared of to enable.
Make sure you import the necessary namespaces at the beginning of your file:
Imports Microsoft.Office.Interop.Excel
Use this code in Invoke Code activity
Dim excelApp As Microsoft.Office.Interop.Excel.Application
Dim workbook As Microsoft.Office.Interop.Excel.Workbook
Dim worksheet As Microsoft.Office.Interop.Excel.Worksheet
excelApp = New Microsoft.Office.Interop.Excel.ApplicationClass()
workbook = excelApp.Workbooks.Open("your_excel_file_path.xlsx")
worksheet = workbook.Sheets("Sheet1") ' Replace "Sheet1" with your sheet name
Dim headerRange As Microsoft.Office.Interop.Excel.Range
headerRange = worksheet.Rows(1)
headerRange.Font.Bold = True
workbook.Save()
workbook.Close()
excelApp.Quit()
Thanks,
Ashok
Thanks,
Done
You’re welcome @bayu.herlambang
Happy Automation!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.