←Select platform

SetDataFormatString Method

Summary

Applies a specific data format string to the cell's content that allows for the customization of how numeric values, dates, and other data types are displayed within a cell.

Syntax

C#
C++/CLI
Python
public void SetDataFormatString( 
   string format 
) 
public:  
   void SetDataFormatString( 
      String^ format 
   ) 
def SetDataFormatString(self,format): 

Parameters

format

A string specifying the format to apply to the cell's content. The format string determines how data types like numbers and dates are formatted.

Remarks

This method enables precise control over the appearance of data within a cell, allowing for a wide range of formatting options including numeric, date, and custom formats. This flexibility is crucial for applications that require data to be presented in a specific format for clarity, compliance, or user preference.

Formatting is applied at the cell level, meaning each cell can have its own unique format. This is particularly useful in tables where different columns represent different data types, such as financial reports, timetables, or statistical summaries.

It is important to use valid format strings, as incorrect formats can lead to unexpected results or errors.

Requirements

Target Platforms

See Also

CellStyle Class

CellStyle Members

Leadtools.Document.LEADOffice.Sheet Namespace

Help Version 23.0.2024.4.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.LEADOffice Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.