Powershell: save bold text into variable

Viewed 88

I'd like to ask you for a help how to save bold text into variable from Excel via Powershell. I'm not a full time developer, just trying to make my life easier with Powershell :)

This is what I have (it's not a lot unfortunately):

# Open file test.xlsx
$excel = Open-ExcelPackage -Path './test.xlsx'

# Copy content of the worsksheet 'Sheet1'
$worksheet = $excel.Workbook.Worksheets['Sheet1']

# Copy specific cell value to the variable    
$String = $worksheet.Value
$StringBold = 

# Close Excel file
Close-ExcelPackage -ExcelPackage $Excel

I'm able to save content of the file test.xlsx into &worksheet variable. In some cell might be the string 'How are you today Marek?' So the next step should be to save only word Marek into the variable $StringBold

Thanks a lot for any advice.

0 Answers
Related