I am copying several worksheets from one workbook to another. The first sheet contains some data that all the other sheets link to from text boxes using a formula something like this: =’Cover Sheet’!A2
However, the new document changes the formula to maintain its link to the original workbook, and adds a file reference: =’C:\Users…\AppData\Local\Temp[tmpD474.tmp]Cover Sheet’!A4
Is it possible to have it copy the formulas literally so that they point to the new workbook’s Cover Sheet? If not, then I have a completely different question: how do you change the contents of an Excel text box using c# interop?
I figured out how to changed the contents of a text box. First you have to name the text box in Excel, then get the call Worksheet.Shapes.Item(“”) to get the TextBox as a Shape object, then modify the text by setting the TextBox.TextFrame.Characters.Text property.