Free Support Forum - aspose.cloud

Import Batch Data JSON in Excel Worksheet using Aspose.Cells Cloud API

Where can we see sample structure or clear documentation for the Import Batch Data JSON?

I’ve managed to find some simple examples which have led me to this:

{
“BatchData”: [
{
“rowIndex”: 0,
“columnIndex”: 0,
“type”: “String”,
“value”: “sport”,
“style”: null
},
{
“rowIndex”: 0,
“columnIndex”: 1,
“type”: “String”,
“value”: “ultra”,
“style”: null
},
{
“rowIndex”: 0,
“columnIndex”: 2,
“type”: “String”,
“value”: “20/01/2018”,
“style”: null
},
{
“rowIndex”: 1,
“columnIndex”: 0,
“type”: “String”,
“value”: “$10,000.00”,
“style”: null
},
{
“rowIndex”: 1,
“columnIndex”: 1,
“type”: “String”,
“value”: “27”,
“style”: null
},
{
“rowIndex”: 1,
“columnIndex”: 2,
“type”: “Int”,
“value”: 10,
“style”: “Number”
}
],
“DestinationWorksheet”: “Sheet1”,
“IsInsert”: false,
“ImportDataType”: “BatchData”
}

But I want clearer docs. What is the ‘style’ property and how can we set it?

@patrick_daly

We apologize for the late reply. We are looking into your query and will update you shortly.

@patrick_daly

Please find Style resources details, we will include the details in public documentation as well. Please feel free to contact us for any further assistance.

|| Property Name || Type || Description || RO/RW ||
| Name | string \ | Name of the style | RW \ |
| Font | List | Font setting list \ | RW \ |
| CultureCustom | string | Culture custom number format. | RW \ |
| Custom | string | Custom number format string of a cell. | RW \ |
| BackgroundColor | string | Style’s background color | RW \ |
| ForegroundColor | string | Style’s foreground color | RW \ |
| IsFormulaHidden | string | Represents whether the formula will be hidden when the worksheet is protected | RW \ |
| IsDateTime | string | Indicates whether the number format is a date format | RO \ |
| IsTextWrapped | string | Indicating whether the text within a cell is wrapped. | RW \ |
| IsGradient | string | Indicates whether the cell shading is a gradient pattern. | RW \ |
| IsLocked | string | Indicating whether a cell can be modified or not | RW \ |
| IsPercent | string | Indicates whether the number format is a percent format. | RO \ |
| ShrinkToFit | string | Indicates whether text automatically shrinks to fit in the available column width | RW \ |
| IndentLevel | integer \ | Represents the m_IndentLevel level for the cell, the value is between 0 to 15 | RW \ |
| Number | integer | Display format of numbers and dates | RW \ |
| RotationAngle | integer | Represents text rotation angle. | RW \ |
| Pattern | string(None/Solid/Gray50/Gray75/Gray25/HorizontalStripe/VerticalStripe/ReverseDiagonalStripe/DiagonalStripe/DiagonalCrosshatch/ThickDiagonalCrosshatch/ThinHorizontalStripe/ThinVerticalStripe/ThinReverseDiagonalStripe/ThinDiagonalStripe/ThinHorizontalCrosshatch/ThinDiagonalCrosshatch/Gray12/Gray6) | Cell background pattern type. | RW \ |
| Borders | List | Cell border setting list \ | RW \ |

Border Properties

|| Property Name || Type || Description || RO/RW ||
| BorderType | string (LeftBorder/RightBorder/TopBorder/BottomBorder/DiagonalDown/DiagonalUp/Horizontal/Vertical) | Border line types | RW \ |
| Color | Color \ | Border line color \ | RW |
| LineStyle | string (None/Thin/Medium/Dashed/Dotted/Thick/Double/Hair/MediumDashed/DashDot/MediumDashDot/DashDotDot/MediumDashDotDot/SlantedDashDot) | Border line style \ | RW |

Please find JSON sample values of style as following, for your reference.

{
“Font”: {
“Color”: {
“A”: 255,
“R”: 255,
“G”: 0,
“B”: 0
},
“DoubleSize”: 11.0,
“IsBold”: “true”,
“IsItalic”: “true”,
“IsStrikeout”: “true”,
“IsSubscript”: “false”,
“IsSuperscript”: “false”,
“Name”: “Arial”,
“Size”: 24,
“Underline”: “Single”
},
“Name”: null,
“CultureCustom”: “”,
“Custom”: “”,
“BackgroundColor”: {
“A”: 255,
“R”: 65,
“G”: 105,
“B”: 225
},
“ForegroundColor”: {
“A”: 255,
“R”: 128,
“G”: 128,
“B”: 128
},
“IsFormulaHidden”: “False”,
“IsDateTime”: “False”,
“IsTextWrapped”: “False”,
“IsGradient”: “False”,
“IsLocked”: “True”,
“IsPercent”: “False”,
“ShrinkToFit”: “False”,
“IndentLevel”: 0,
“Number”: 0,
“Rotation”: 0,
“RotationAngle”: 60,
“Pattern”: “Solid”,
“TextDirection”: “Context”,
“VerticalAlignment”: “Bottom”,
“HorizontalAlignment”: “General”,
“BorderCollection”: [
{
“LineStyle”: “Thin”,
“Color”: {
“A”: 255,
“R”: 0,
“G”: 0,
“B”: 0
},
“BorderType”: “BottomBorder”
},
{
“LineStyle”: “None”,
“Color”: {
“A”: 255,
“R”: 0,
“G”: 0,
“B”: 0
},
“BorderType”: “DiagonalDown”
},
{
“LineStyle”: “None”,
“Color”: {
“A”: 255,
“R”: 0,
“G”: 0,
“B”: 0
},
“BorderType”: “DiagonalUp”
},
{
“LineStyle”: “None”,
“Color”: {
“A”: 255,
“R”: 0,
“G”: 0,
“B”: 0
},
“BorderType”: “Horizontal”
},
{
“LineStyle”: “Medium”,
“Color”: {
“A”: 255,
“R”: 142,
“G”: 180,
“B”: 227
},
“BorderType”: “LeftBorder”
},
{
“LineStyle”: “Medium”,
“Color”: {
“A”: 0,
“R”: 192,
“G”: 80,
“B”: 77
},
“BorderType”: “RightBorder”
},
{
“LineStyle”: “Thin”,
“Color”: {
“A”: 255,
“R”: 0,
“G”: 0,
“B”: 0
},
“BorderType”: “TopBorder”
},
{
“LineStyle”: “None”,
“Color”: {
“A”: 255,
“R”: 0,
“G”: 0,
“B”: 0
},
“BorderType”: “Vertical”
}
]
}