Financial Applications using Excel Add-in Development in C/C++ phần 8

ID này được thiết kế để được sử dụng trong các cuộc gọi đến xlfUnregister. Tuy nhiên, một lỗi trong Excel ngăn chặn điều này từ bỏ đăng ký chức năng như dự định - xem phần tiếp theo. Nếu bạn đã không ghi lại các ID | Miscellaneous Topics 387 from other arguments. This simpler strategy works well where the DLL needs to maintain a table of global or unique data. Calls to MakeArray would update the table and return an incremented sequence number. Calls to UseArray would be triggered to recalculate something that depended on the values in the table. A C EXCEL NAME CLASS EXAMPLE xlName This section describes a class that encapsulates the most common named range handling tasks that an add-in is likely to need to do. In particular it facilitates the creation of references to already-defined names the discovery of the defined name corresponding to a given range reference the reading of values from worksheet names commands and macro sheet functions only the assignment of values to worksheet names commands only the creation and deletion of worksheet names commands only the creation and deletion of DLL-internal names all DLL functions the assignment of an internal name to the calling cell. It would be possible to build much more functionality into a class than is contained in xlName but the point here is to highlight the benefit of even a simple wrapper to the C API s name-handling capabilities. A more sophisticated class would for example provide some exception handling - a subject deliberately not covered by this book. The definition of the class follows. Note that the class uses the cpp_xloper class for two of its data members. The definition and code are contained in the example project on the CD ROM in the files and respectively. class xlName public --------------------------------------------------------------------- constructors destructor --------------------------------------------------------------------- xlName m_Defined false m_RefValid false m_Worksheet false xlName const char name Set name Reference to existing range xlName Clear Copy constructor uses operator function xlName const xlName source this source .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.