issue with concatonating string exporting to excel through C#
Hello, and thank you in advance for your support.
I am trying to export a string to Excel in my C# program, which contains
multiple font formats. My string is 1/2 static and 1/2 dynamic with the font
formatting in the static portion. I need to have the string display as
follows,
(static)Communities include[superscript](1)[/superscript]: (dynamic)
community1,community2,etc.
The string must be contained in a single cell centered on the report.
I have tried writing the static portion to a single cell in excel, and using
an * after that. Then calling the range.Replace() function. The arguments for
this function are listed as 2 required and the rest optional, but using
Visual C# .NET, my compiler is requiring me to supply every argument, which
then gives me an error in my excel generator.
I have searched for an append function in the excel namespace, but to no
avail. I also tried the excel.WorksheetFunction.Substitute() function, but my
program is requiring 4 arguments: 3 strings, and one object. Every reference
I can find requires only 3 arguments, which confounds me. Any help would be
much appreciated, and once again, thank you for your assistance.
Brandon Schoen
Real Estate Economics
|