Share via

Excel macro to C# StringToDouble

Jozsi 21 Reputation points
2020-12-31T08:24:34.357+00:00

Hi,

This is a visual basik macro: "Columns("E:E").Select
Selection.TextToColumns Destination:=Range("E1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True"

I want C# to do this. What's wrong is that?: "range = osheet1.get_Range("E2", Missing.Value);
range.TextToColumns(Destination:=range,DataType:=xlDelimited,Excel.XlTextQualifier.xlTextQualifierDoubleQuote);"
Best regards,
Józsi

Microsoft 365 and Office | Excel | For business | Windows
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.