Updating Properties of an Excel cell, with Sql statement

excelssis

So far, i have constructed a SSIS Package that creates multiple Worksheets in an Excel Speadsheet and populates it with values (Reports).

Then I can Execute a SQL statement, via SSIS, to selectively update values in the Sheet:

"Update [Sheet1] Set F1 = 'TOTAL:' Where F1 like 'Total:%' "

A next step would be, to Bold the Cells that contains the text "TOTAL:", using SQL.

If possible, I do not want to write an entire macro or start OLE Automation and Install EXCEL on the Server, to just do this.

Is there a way (maybe a syntax change to an Update statement) to accomplish this quickly.

"Update [Sheet1] Set F1.Bold = 'True' Where F1 like 'Total:%' "

Would this be Possibe?

Best Answer

That sounds mighty painful.

Is there any opportunity to use Conditional Formatting (Home, Conditional Formatting, New Rule) in your template Excel document?

Bold rows with Total text

Then apply that rule to the whole worksheet/workbook so that when the row with Total moves from row 20 to 25, it correctly enboldens the proper cells?

Related Question