Chỉnh sửa góc excel

Bạn có thể chỉnh sửa nội dung của ô trực tiếp trong ô hoặc bằng cách nhập vào thanh công thức. Theo mặc định, tính năng chỉnh sửa được bật trong bảng tính. Sử dụng thuộc tính

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
1 để bật hoặc tắt tính năng chỉnh sửa

Chỉnh sửa ô

Bạn có thể bắt đầu chỉnh sửa bằng một trong các cách sau,

  • Nhấp đúp vào một ô để bắt đầu chế độ chỉnh sửa
  • Nhấn phím
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    2 để chỉnh sửa ô hiện hoạt
  • Sử dụng thanh công thức để thực hiện chỉnh sửa
  • Sử dụng phím
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    3 hoặc
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    4 để xóa nội dung ô và bắt đầu chế độ chỉnh sửa
  • Sử dụng phương pháp
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    5

Lưu ô

Nếu ô ở trạng thái có thể chỉnh sửa, bạn có thể lưu ô đã chỉnh sửa bằng một trong các cách sau,

  • Thực hiện nhấp chuột vào bất kỳ ô nào khác thay vì ô đang chỉnh sửa hiện tại
  • Nhấn phím
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    6 hoặc
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    7 để lưu nội dung ô đã chỉnh sửa
  • Sử dụng phương pháp
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    0

Hủy chỉnh sửa

Để hủy chỉnh sửa mà không lưu thay đổi, bạn có thể sử dụng một trong các cách sau,

  • Nhấn phím
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    1, thao tác này sẽ xóa trạng thái có thể chỉnh sửa và cập nhật nội dung ô không thay đổi
  • Sử dụng phương pháp
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
    import { AppComponent } from './app.component';
    
    /**
     * Module
     */
    @NgModule({
        imports: [
            BrowserModule,
            SpreadsheetAllModule
        ],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    export class AppModule { }
    2

Mẫu sau đây cho thấy cách ngăn chỉnh sửa và lưu ô. Ở đây cột

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
3 ngăn việc chỉnh sửa bằng cách sử dụng đối số hủy là đúng trong sự kiện
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
4. Trong cột
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
5, ngăn lưu các thay đổi đã chỉnh sửa bằng cách sử dụng đối số hủy là true trong
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
6 và sử dụng phương pháp
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
2 trong bảng tính

  • ứng dụng. thành phần. ts
  • ứng dụng. mô-đun. ts
  • chủ yếu. ts

________số 8

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        SpreadsheetAllModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
0

Xem trước mẫu

Hạn chế

  • Tràn văn bản trong các ô không được hỗ trợ trong Chỉnh sửa

Ghi chú

Bạn có thể tham khảo trang tham quan tính năng Bảng tính góc của chúng tôi để biết các biểu diễn tính năng đột phá của nó. Bạn cũng có thể khám phá ví dụ về Bảng tính góc của chúng tôi để biết cách trình bày và thao tác dữ liệu