Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
| Format | Supported | Not yet |
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| DOCX | inherited styles, run formatting, lists/numbering, tables (merge, border, shading, table style), images, hyperlinks, header/footer, PAGE field, text boxes, page/section breaks, text columns, tracked changes | footnote body, charts, exact float wrapping, paragraphs split across pages |
| XLSX | shared strings, number/date formats, font/fill/border/align, merge, freeze, hidden columns/rows, wrap, formula calculation (135 functions, recalculated on edit), multiple sheets | charts, conditional formatting, images |
| XLSX | shared strings, number/date formats, font/fill/border/align, merge, freeze, hidden columns/rows, wrap, formula calculation (135 functions, recalculated on edit), multiple sheets, images and charts over the cells | chartex charts (placeholder), shapes, conditional formatting |
| PPTX | master/layout/theme, placeholder inheritance, ~50 preset shapes, custGeom, images (crop), tables + table style, groups, bullet/autonum, autofit | charts (placeholder), SmartArt, animations, video playback |

XLSX charts are drawn as SVG over the cells: bar and column (clustered, stacked, 100%), line (markers, smoothing), area, pie and doughnut (exploded slices), scatter, bubble, radar (lines, markers, filled), stock (high-low lines, up-down bars), surface (seen from above, as a contour chart, or as a wireframe), combinations of them on primary and secondary axes; 3D charts as their flat form. Fills, lines and text follow the file: colors, gradients, pattern fills, line widths and dashes, markers, the text color and size of titles, axes, legend and data labels, the chart and plot area backgrounds, and the built-in chart style (its colors and dark backgrounds; not its bevels and shadows). Their values come from the workbook's cells, so a chart follows edited cells (also on a sheet not yet shown); a series referring to a defined name or another workbook shows the values saved with the chart. Axis bounds, gridlines, number formats, title, legend, data labels, the theme's colors and the plot's manual layout follow the file; trendlines, error bars and data tables are not drawn yet.

Password-protected (encrypted) files are not supported.

### Word, Excel and PowerPoint 97-2003, RTF and OpenDocument
Expand Down
3 changes: 3 additions & 0 deletions src/core/worker/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { BlobSource, openSource, type DocSource } from '../source'
import { decodeText, extOf, HAS_SOURCE, mayBePlain, plainFormat, plainToOffice, ungzipped } from '../plain'
import { XlsxWorkbook } from '../xlsx/workbook'
import { XlsxEditor } from '../xlsx/editor'
import { readSheetDrawings } from '../xlsx/drawings'
import { loadDelimited } from '../xlsx/import'
import type { BookOp, CellInput, FindOptions, FmtPatch, Range, SheetOp } from '../xlsx/types'
import type { PParaSpec, ShapeOp, SlideOp } from '../pptx/types'
Expand Down Expand Up @@ -207,6 +208,8 @@ export class Engine {
return this.need(this.xlsx).block(args[0] as number, args[1] as number, args[2] as number)
case 'xlsx.cell':
return this.need(this.xlsx).cell(args[0] as number, args[1] as number, args[2] as number)
case 'xlsx.drawings':
return readSheetDrawings(this.need(this.xlsx), args[0] as number)
case 'xlsx.find':
return this.need(this.xlsx).find(args[0] as number, args[1] as string, args[2] as FindOptions)
case 'xlsx.text':
Expand Down
3 changes: 3 additions & 0 deletions src/core/worker/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { POp } from '../../collab/pptx-ops'
import type { PptxCollabResult } from '../../collab/pptx-worker'
import type { CanonStyle, DocxMeta, Block, EditOp, EditResult, HFSet, HFSetResult, PageSet, PageSetResult, ParaSpec, StyleInfo, StyleLook, StyleSetResult, TableOp } from '../docx/types'
import type { BlockOut, BookOp, CellDetail, CellInput, FindMatch, FindOptions, FmtPatch, Range, SheetOp, SheetProgress, WorkbookMeta, XlsxEditResult } from '../xlsx/types'
import type { SheetDrawing } from '../xlsx/drawings'
import type { PParaSpec, PresentationMeta, ShapeOp, SlideModel, SlideOp } from '../pptx/types'

export interface OpenParams {
Expand Down Expand Up @@ -69,6 +70,8 @@ export interface Methods {
'xlsx.load'(sheet: number): void
'xlsx.block'(sheet: number, r0: number, r1: number): BlockOut
'xlsx.cell'(sheet: number, r: number, c: number): CellDetail | undefined
/** the sheet's pictures and charts, where they are anchored */
'xlsx.drawings'(sheet: number): SheetDrawing[]
/** cells whose shown value (or formula) contains the text */
'xlsx.find'(sheet: number, query: string, opts?: FindOptions): FindMatch[]
/** the sheet as delimited text (the values as shown): `sep` a comma (with a byte order mark) or a tab */
Expand Down
Loading