Hi,
Anyone can guide me on how to bold the header in Excel?
Thanks in advance!
Hi,
Anyone can guide me on how to bold the header in Excel?
Thanks in advance!
@leewe01 use select range activity and give range than use send hot key activity by passing ctrl+b
hI @indra, do u have sample to Bold?I had tried as u mentioned above but seems not affected at all. Tq.
Iâm having the same problem too. Anyone have any suggestion or knows the reason why sending hotkey âctrl+bâ isnât working?
Hi @Bonus
For easier appraoch, u can use invoke vba activity for this
it would be better apparach as it helps to invoke vba code to make headers bold
I gave this a try and it worked. Thanks.
Hi @NIVED_NAMBIAR ,
Can you please ping the invoke code here? So that I can try?
Hi @shreyash_shirbhate ,
try the below code. it will convert the font to bold for the specific range of headers. use invoke code activity and import microsft.office.interop.excel namespace. thanks.
Dim excel As Microsoft.Office.Interop.Excel.Application
Dim wb1 As Microsoft.Office.Interop.Excel.Workbook
Dim ws1 As Microsoft.Office.Interop.Excel.Worksheet
excel = New Microsoft.Office.Interop.Excel.ApplicationClass
wb1 = excel.Workbooks.Open(âYour Excel File Pathâ)
ws1 = CType(wb1.Sheets(âYourSheetNameâ), Microsoft.Office.Interop.Excel.Worksheet)
ws1.Range(âA1:J1â).Font.Bold=True
wb1.Save
wb1.Close
excel.Quit
ws1 = Nothing
wb1 = Nothing
excel = Nothing
GC.Collect
Try the below code
Private Sub FormatHeaders()
Dim A as Worksheet
For Each A in Worksheets
A.Activate
Cells.EntireColumn.Autofit
Cells.EntireRow.Autofit
Rows(â1:1â).Font.Bold = True
Next
Sheets(1).Select
End Sub
Regards
Gokul
What you can do isâŚ
please refer to the original post
thanks
Hey @Gokul001,
where to give the path name here?
@Ahmad_Rais This is not the solution, I have already seen and tried it.
Thanks!
whats the problem when u try it ?,
maybe i can helps
thanks
Thanks @kirankumar.mahanthi1,
It is working now, We have to give the full path otherwise it will not work.
Thanks @Gokul001, appreciate your help man!
@Ahmad_Rais I have got the solution but for your knowledge the problem was occurring while sending the hotkey and it was not reflecting in the sheet.
okey thanks , what is the solution you get?
regards
ahmad
@Ahmad_Rais Please check @kirankumar.mahanthi1 post above!
thanks