Eine Excel Tabelle sortieren nach Spalte I ab der Zeile 5 absteigend using c sharp
Hallo,
ich möchte eine Excel Tabellle sortieren nach Spalte (Range) "I5" also ab die Zeile 5. ich habe die folgende Code gefunden aber taucht ein fehler:
Excel.Range rngSort = ws.get_Range("I5", missing);
rngSort.Activate();
rngSort.Cells.Select();
rngSort.Sort(Type.Missing,
Excel.XlSortOrder.xlAscending,
Type.Missing,
Excel.XlSortOrder.xlAscending,
Excel.XlSortOrder.xlAscending,
Type.Missing,
Excel.XlSortOrder.xlAscending,
Excel.XlYesNoGuess.xlYes,
Type.Missing,
Type.Missing,
Excel.XlSortOrientation.xlSortColumns,
Excel.XlSortMethod.xlPinYin,
Excel.XlSortDataOption.xlSortNormal,
Excel.XlSortDataOption.xlSortNormal,
Excel.XlSortDataOption.xlSortNormal);
Gruß
Kaiser
ich möchte eine Excel Tabellle sortieren nach Spalte (Range) "I5" also ab die Zeile 5. ich habe die folgende Code gefunden aber taucht ein fehler:
Excel.Range rngSort = ws.get_Range("I5", missing);
rngSort.Activate();
rngSort.Cells.Select();
rngSort.Sort(Type.Missing,
Excel.XlSortOrder.xlAscending,
Type.Missing,
Excel.XlSortOrder.xlAscending,
Excel.XlSortOrder.xlAscending,
Type.Missing,
Excel.XlSortOrder.xlAscending,
Excel.XlYesNoGuess.xlYes,
Type.Missing,
Type.Missing,
Excel.XlSortOrientation.xlSortColumns,
Excel.XlSortMethod.xlPinYin,
Excel.XlSortDataOption.xlSortNormal,
Excel.XlSortDataOption.xlSortNormal,
Excel.XlSortDataOption.xlSortNormal);
Gruß
Kaiser
2 Antworten
- LÖSUNG SMARTi schreibt am 26.07.2011 um 14:23:51 Uhr
- LÖSUNG KaiserQQ7 schreibt am 26.07.2011 um 14:27:49 Uhr
LÖSUNG 26.07.2011 um 14:27 Uhr