Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OpenXML SDK 2.5 - XLSX - Zelle im Datumsformat

Empfohlene Antworten

Veröffentlicht

Hallo,

ich arbeite gerade mit dem OpenXML SDK 2.5 von MS, um XLSX-Dateien zu schreiben und zu lesen.

Nun ist es so, dass ich eine Zelle ein Datum eintragen möchte. Dies geschieht über folgende Zeilen:


// ...

Cell cell = InsertCellInWorksheet(CellAdressCol, CellAdressRow, wsp);

// ...

cell.CellValue = new CellValue(t.ToOADate().ToString());

cell.DataType = new EnumValue<CellValues>(CellValues.Date);

Aus irgend einem Grund scheint aber die Enumeration "CellValues" an dieser Stelle nicht zu funktionieren... für Number und String geht dies jedoch problemlos...

Ich verwende Office 2007 zum Ansehen... gibt es hier eventuell ein Problem mit der Version? Ist für die SDK 2.5 ein neueres Office besser?

Als String will ich den Wert nur ungern speichern, da ich die Formatierungen alle 1:1 übergeben haben will. Das ganze soll später als Grundlage für eine Berichtskomponente dienen, wo Layout und Fromatierung eine erhebliche Rolle spielen...

Gruß

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.