How to Wrap text in double quote for specific scenario

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
i know how to put text in double quote. this way people put text in double quote.

string s = @"""my string""";


My scenario is bit different. see how my text look like which i need to wrap in double quote.

string formula = Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014

formula = Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014 / Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014

formula = Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 * 5

formula = (Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014)

formula = (Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014) / Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014

basically at runtime i convert these text Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 to excel cell address AA10 etc

now i want to get a specific logic which will put the formula text in double quote. after putting it double quote text should look like following example.

string formula = "Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014"

formula = "Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014" / "Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014"

formula = "Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014" * 5

formula = ("Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014")

formula = ("Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014" + "Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014") / "Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014"
please help me with c# logic how could i put my formula into double quote in this way.

thanks

Continue reading...
 
Back
Top