CN114282499A - Document generation method and device with customized chart, electronic equipment and medium - Google Patents

Document generation method and device with customized chart, electronic equipment and medium Download PDF

Info

Publication number
CN114282499A
CN114282499A CN202111630001.0A CN202111630001A CN114282499A CN 114282499 A CN114282499 A CN 114282499A CN 202111630001 A CN202111630001 A CN 202111630001A CN 114282499 A CN114282499 A CN 114282499A
Authority
CN
China
Prior art keywords
document
template
chart
identification information
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111630001.0A
Other languages
Chinese (zh)
Inventor
杨光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202111630001.0A priority Critical patent/CN114282499A/en
Publication of CN114282499A publication Critical patent/CN114282499A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application provides a document generation method, a document generation device, electronic equipment and a medium with a customized chart, wherein the method comprises the following steps: generating a template document, wherein the template document comprises a template chart and identification information; acquiring a bottom storage file corresponding to the template document; acquiring identification information in the bottom storage file; acquiring a variable set according to the identification information; acquiring the positions of the elements in the variable set in the labels of the template chart; changing the style information of the element according to the initial element corresponding to the element in the template chart; and inserting the element into the position of the label. By implementing the embodiment, the document comprising the customized chart can be generated quickly and conveniently.

Description

Document generation method and device with customized chart, electronic equipment and medium
Technical Field
The present application relates to the field of document generation technologies, and in particular, to a document method and apparatus with a customized chart, an electronic device, and a computer-readable storage medium.
Background
Documents are often used as carriers in daily offices for presenting data, and therefore many business software require specific documents containing charts in specific formats.
The specific document generation in the prior art is mainly realized through a configuration file, and the technical disadvantage is that the configuration process is tedious, if only title and chart data are configured, the configuration process is relatively simple, but if chart styles are required to be configured, the configuration process is tedious and easy to make mistakes. The second way is to make a template chart, which is mainly realized by inserting the template chart into a document in a link mode, and the disadvantage of the way is that the document needs to be opened manually and the yes or update link is clicked, the data of the document is updated and displayed according to the chart data document, the document is closed and whether the document is stored or not is prompted, and the process is complicated when the document is opened again next time.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for generating a customized chart, an electronic device, and a storage medium, which can quickly and directly generate a customized chart in a document without a cumbersome configuration process.
In a first aspect, an embodiment of the present application provides a document generation method with a custom chart, where the method includes:
generating a template document, wherein the template document comprises a template chart and identification information;
acquiring a bottom storage file corresponding to the template document;
acquiring the identification information in the bottom storage file;
acquiring a variable set according to the identification information;
acquiring the corresponding label positions of the elements in the variable set in the template chart;
changing the style information of the element according to the initial element corresponding to the element in the template chart;
and inserting the element into the position of the label.
In the implementation process, the document including the template chart is obtained, and different from the prior art, the document directly includes the template chart, and the template chart does not exist in the document in a link mode, so that frequent clicking by a user is not needed in the process of generating the customized chart, and the convenience of user operation is improved. The variable set can be obtained according to the identification information, a user does not need to actively obtain the variable set, the style information of the elements is changed according to the initial elements corresponding to the elements in the template chart, and the styles of the generated customized chart and the template chart can be kept consistent. Based on the embodiment, the customized chart consistent with the style of the template chart can be quickly, quickly and conveniently generated.
Further, the step of generating a template document includes:
creating an Excel document;
creating a template chart in the Excel document;
creating a Word document or a PowerPoint document;
copying the template chart to the Word document or the PowerPoint document;
inserting the identification information into the Word document or the PowerPoint document;
and storing the Word document or the PowerPoint document to obtain the template document.
In the implementation process, firstly, a document comprising a template chart is obtained, the template chart is firstly created in an EXCEL document, identification information is inserted below the template chart, and then a Word document or a PowerPoint document is created; copying the template chart to a Word document or a document; and saving the Word document or the PowerPoint document to obtain a template document. Based on the embodiment, the Word document or the PowerPoint document comprises the template chart and the identification information, the whole creating process is based on common office software, no additional configuration file is needed, and errors are not easy to occur.
Further, the step of generating a template document includes:
creating a Word document or a PowerPoint document;
creating a template chart in the Word or the PowerPoint document;
acquiring a data table corresponding to the template chart;
and inserting the identification information into the data table, and storing the Word document or the PowerPoint document to obtain the template document.
In the implementation process, firstly, a Word document or a PowerPoint document is created, then a template chart is created in the Word document or the PowerPoint document, and a data table corresponding to the template chart is obtained; and inserting identification information into the data table, and storing the Word document or the PowerPoint document to obtain a document comprising the template chart. Based on the embodiment, the Word document or the PowerPoint document comprises the template chart, the chart template comprises the identification information, the whole creating process is based on common office software, no additional configuration file is needed, and errors are not easy to occur.
Further, the step of obtaining the variable set according to the identification information includes:
acquiring the variable set according to the identification information;
acquiring category series names in the template chart from the bottom-layer storage file;
acquiring a category series subset and a value series subset in the variable set according to the category series name;
the step of inserting the element into the tag location comprises:
and inserting the elements of the series of subsets and the elements of the value series of subsets into the corresponding positions of the tags.
In the implementation process, the template chart comprises a series and a value corresponding to the series, so that the variable set comprises two subsets, namely a category series subset and a value series set; the category series name can be obtained in the template chart, the category series subset can be obtained, and the value series subset can be obtained according to the value series name.
Further, the step of obtaining the variable set according to the identification information includes:
acquiring a category series subset and a value series subset according to the identification information;
the step of inserting the element into the tag location comprises:
and inserting the elements of the series of subsets and the elements of the value series of subsets into the corresponding positions of the tags.
In the implementation process, because the identification information is in the label position corresponding to the template chart, the desired series subset and the value series subset can be directly obtained according to the identification information, and the elements of the two subsets are inserted into the corresponding label positions to obtain the customized chart.
Further, the step of changing the style information of the element according to the initial element corresponding to the element in the template chart includes:
acquiring an initial index of the initial element in the template chart;
judging whether the initial index is the same as the set index of the element in the variable set or not;
if not, acquiring a style text of the initial element in the bottom-layer storage file according to the initial index;
and modifying the index in the style text into the set index.
In the implementation process, in order to obtain the customized chart with the same style as the template chart, the important point is to keep the styles of all the replacing elements consistent with the style of the initial element in the template chart, so that the initial index of the initial element in the template chart is obtained from the bottom-layer storage file; judging whether the initial index and the set index of the elements in the set variable set are the same enough, if so, indicating that the style of the elements does not need to be modified, and if not, modifying the style of the elements.
Further, the template document has a plurality of the template charts therein;
the identification information comprises serial number information;
the step of obtaining the variable set according to the identification information includes:
and acquiring the variable set according to the sequence number information.
In the implementation process, considering that different forms are needed to display different data in different office scenes, a plurality of charts are arranged in the template chart, the sequence number information is arranged in the identification information, and in the process of specifically generating the customized chart, the variable set is obtained according to the sequence number information, so that the customized chart with composite requirements is generated.
In a second aspect, an embodiment of the present application provides a document generating apparatus with a custom chart, including:
the generating module is used for generating a template document, and the template document comprises a template chart and identification information;
the bottom storage file acquisition module is used for acquiring a bottom storage file corresponding to the template document;
the identification information acquisition module is used for acquiring identification information in the bottom storage file;
the variable set acquisition module is used for acquiring a variable set according to the identification information;
the position of the located label is used for obtaining the position of the located label of the element in the variable set in the template chart;
the style information changing module is used for changing the style information of the label position according to the initial element corresponding to the element in the template;
and the inserting module is used for inserting the element into the position of the label.
In the implementation process, the document including the template chart is obtained, and different from the prior art, the document directly includes the template chart, and the template chart does not exist in the document in a link mode, so that frequent clicking by a user is not needed in the process of generating the customized chart, and the convenience of user operation is improved. The variable set can be obtained according to the identification information, a user does not need to actively obtain the variable set, and the style information of the elements is changed according to the initial elements corresponding to the elements in the template chart, so that the styles of the generated customized chart and the template chart are kept consistent. Based on the embodiment, the customized chart consistent with the style of the template chart can be quickly, quickly and conveniently generated.
In a third aspect, an electronic device provided in an embodiment of the present application includes: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any of the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, cause the computer to perform the method according to any one of the first aspect.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the above-described techniques.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a flowchart illustrating a document generation method with a custom chart according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a method for generating a template document according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a template chart provided in an embodiment of the present application;
FIG. 4 is another schematic diagram of a template diagram provided in accordance with an embodiment of the present application;
FIG. 5 is a flowchart illustrating a second method for generating a template document according to an embodiment of the present application;
FIG. 6 is another schematic diagram of a template diagram provided in accordance with an embodiment of the present application;
FIG. 7 is another schematic diagram of a template diagram provided in accordance with an embodiment of the present application;
FIG. 8 is another schematic diagram of a template chart provided in accordance with an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a document device with a custom chart according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
Referring to fig. 1, an embodiment of the present application provides a document generation method with a custom chart, including:
s1: generating a template document, wherein the template document comprises a template chart and identification information;
s2: acquiring a bottom storage file corresponding to the template document;
s3: acquiring identification information from a bottom-layer storage file;
s4: acquiring a variable set according to the identification information;
s5: acquiring the corresponding label positions of the elements in the variable set in the template chart;
s6: changing the style information of the element according to the initial element corresponding to the element in the template chart;
s7: the element is inserted into the position of the label.
In the above embodiments, the underlying storage file generally refers to an Extensible Markup Language (XML) document. A set of variables is an ordered set of elements with different names in different computer languages. The tag position refers to the corresponding position of the element in the variable set in the underlying storage file of the template chart.
The document comprising the template chart is obtained, and different from the prior art, the document directly comprises the template chart which does not exist in the document in a link mode, so that frequent clicking by a user is not needed in the process of generating the customized chart, and the convenience of user operation is improved. The variable set can be obtained according to the identification information, a user does not need to actively obtain the variable set, and the style information of the elements is changed according to the initial elements corresponding to the elements in the template chart, so that the styles of the generated customized chart and the template chart are kept consistent. Based on the embodiment, the customized chart consistent with the style of the template chart can be quickly, quickly and conveniently generated.
Referring to fig. 2, the present application provides two methods for generating a template document. The first method comprises the following steps:
s101: creating an Excel document;
s102: creating a template chart in an Excel document;
s103: creating a Word document or a PowerPoint document;
s104: copying the template chart to a Word document or a PowerPoint document;
s105: inserting identification information into a Word document or a PowerPoint document;
s106: and saving the Word document or the PowerPoint document to obtain a template document.
In the implementation process, firstly, a document comprising a template chart is obtained, the template chart is firstly created in an EXCEL document, identification information is inserted below the template chart, and then a Word document or a PowerPoint document is created; copying the template chart to a Word document or a document; and saving the Word document or the PowerPoint document to obtain a template document. Based on the embodiment, the Word document or the PowerPoint document comprises the template chart and the identification information, the whole creating process is based on common office software, no additional configuration file is needed, and errors are not easy to occur.
Illustratively, referring to fig. 3 and 4, the schematic diagram of creating a template chart in Excel and then copying the template chart in a Word document is shown. FIG. 4 is the addition of identification information to FIG. 3, the identification information in FIG. 4 being $ { character 1: data }. In addition, a title identifier $ { title } can be inserted into the template graph table, and a title variable of the template graph can be obtained according to $ { title }.
Referring to fig. 5, the second method of generating a template document includes:
s210: creating a Word document or a PowerPoint document;
s211: creating a template chart in a Word or PowerPoint document;
s212: acquiring a data table corresponding to the template chart;
s213: and inserting identification information into the data table, and storing the Word document or the PowerPoint document to obtain the template document.
In the implementation process, firstly, a Word document or a PowerPoint document is created, then a template chart is created in the Word document or the PowerPoint document, and a data table corresponding to the template chart is obtained; and inserting identification information into the data table, and storing the Word document or the PowerPoint document to obtain a document comprising the template chart. Based on the embodiment, the Word document or the PowerPoint document comprises the template chart, the chart template comprises the identification information, the whole creating process is based on common office software, no additional configuration file is needed, and errors are not easy to occur.
Referring to fig. 6 and 7, schematic diagrams of creating a board document in PowerPoint using the above method are provided for the present application. Fig. 6 is a diagram showing an effect of editing a design chart in a PowerPoint document, and fig. 7 is a screenshot of a PowerPoint template. It should be noted that, in the change from fig. 6 to fig. 7, elements such as "beijing" are deleted, but the information of "beijing" still exists in the underlying storage file, and the identification information in fig. 7 is $ { region }, $ { sales }.
The application provides a third template document generation method, which is to create a template chart in Excel, obtain a data table corresponding to the template chart, and add identification information in the data table.
Referring to fig. 8, in a possible implementation manner, based on the above-described first method for generating a template document, an embodiment of the present application provides an implementation manner of S4, including:
s401: acquiring a variable set according to the identification information;
s402: acquiring category series names in a template chart from a bottom-layer storage file;
s403: and acquiring a category series subset and a value series subset in the variable set according to the category series name.
Meanwhile, the present application provides an implementation of S5, including: and inserting the elements of the series subset and the elements of the value series subset into the corresponding positions of the labels.
In the implementation process, the elements of the series subset and the elements of the value series subset are inserted into the corresponding positions of the tags.
Illustratively, referring to FIG. 4, Table 1 is first looked up according to $ { chart1: data } and then the set of variables is obtained from the data. Then, the variable set is divided into a category series subset and a value series subset. Acquiring a category subset from the bottom layer file, wherein the category subset is combined into a corresponding category as a region, and then acquiring a region subset from the variable set, wherein elements in the region subset comprise: other, Guangdong, Zhejiang, Jiangsu, Beijing, Sichuan, Shanghai, Henan, Fujian, Shandong and Liaoning, because the above figure only includes two data types and values, the remaining set in the variable set is the value series subset.
In a possible implementation manner, based on the second method for generating a template document, an embodiment of the present application provides an implementation manner of S4, including: acquiring a category series subset and a value series subset according to the identification information;
inserting the element into the tag location, comprising: and inserting the elements of the series subset and the elements of the value series subset into the corresponding positions of the labels.
Illustratively, referring to fig. 6, the tag positions in the template chart have identification information $ { region } and $ { sales }, and according to the identification information, the regional subset and sales subset corresponding to the column can be obtained.
It should be noted that, in the process of S5, the step of inserting the plurality of sum elements into the tag positions may be to traverse the rows of the table and fill the sum elements row by row, or traverse and fill the sum elements row by row for each column.
In the implementation process, because the identification information is in the label position corresponding to the template chart, the desired series subset and the value series subset can be directly obtained according to the identification information, and the elements of the two subsets are inserted into the corresponding label positions to obtain the customized chart.
Considering that if only the above steps are performed, once a chart is selected in the foreground of the PowerPoint document and clicks on the edited data, the displayed content of the chart is restored to the appearance of the PowerPoint template.
To solve the above problems. In a possible implementation manner, after S412, the method further includes: finding a corresponding bottom storage file in the memory area, and acquiring the identification information from the bottom storage file; and obtaining a subset and a value series subset according to the identification information, copying a first number of template rows where the identification information is located, wherein the first number is the length of the series subset, obtaining label contents corresponding to a plurality of table rows, and replacing variables in the label contents corresponding to the table rows with elements in the series subset or the value series subset.
In a possible implementation manner, based on the third method for generating a template document, an embodiment of the present application provides an implementation manner of S4, including:
acquiring a category series subset and a value series subset according to the identification information;
and traversing the position of the label where the non-formula cell is located in the bottom-layer storage file, and replacing the identification information with elements in the variable set.
In one possible embodiment, S6 includes the following sub-steps:
s601: acquiring an initial index of an initial element in a template chart;
s602: judging whether the initial index is the same as the set index of the element in the variable set; if not, executing S603;
s603: acquiring a style text of an initial element in a bottom-layer storage file according to the initial index;
s604: and modifying the index in the style text into an aggregate index.
Illustratively, in the XML document corresponding to the template document, the content in the < c: dlbls > tag specifies the legend style, and the id in the parenthesis specifies the tag position corresponding to the style. In the template of fig. 6, the initial index of the 2 nd line of beijing in the template chart is 1, and if the set index of beijing in the region set is 3, the two are different, so that the style text corresponding to beijing is obtained by initially indexing in the style text according to the list index, and the index of the style text is modified into the set index, so that the color of beijing in the template chart is the same as the color of beijing in the customized chart.
In the implementation process, in order to obtain the customized chart consistent with the style of the template chart, the important point is to keep the styles of all the replacing elements consistent with the style of the initial element in the template chart, so that the initial index of the initial element in the template chart is obtained in the bottom-layer storage file; judging whether the initial index and the set index of the elements in the set variable set are the same enough, if so, indicating that the style of the elements does not need to be modified, and if not, modifying the style of the elements.
Further, the template document has a plurality of template charts therein;
the identification information includes serial number information;
the step of obtaining the variable set according to the identification information comprises the following steps:
and acquiring a variable set according to the sequence number information.
In the implementation process, considering that different forms are needed to display different data in different office scenes, a plurality of charts are arranged in the template chart, the sequence number information is arranged in the identification information, and in the process of specifically generating the customized chart, the variable set is obtained according to the sequence number information, so that the customized chart with composite requirements is generated.
For example, referring to FIG. 3, chart1 in $ { chart1: data } is the sequence number information.
Example 2
Referring to fig. 9, an embodiment of the present application provides a document generating apparatus with a custom chart, including:
the generating module 1 is used for generating a template document, and the template document comprises a template chart and identification information;
the bottom storage file acquisition module 2 is used for acquiring a bottom storage file corresponding to the template document;
the identification information acquisition module 3 is used for acquiring identification information from the bottom storage file;
the variable set acquisition module 4 is used for acquiring a variable set according to the identification information;
the located label position obtaining module 5 is used for obtaining the located label positions of the elements in the variable set in the template chart;
the style information changing module 6 is used for changing the style information of the label position according to the initial element corresponding to the element in the template;
and the inserting module 7 is used for inserting the elements into the positions of the labels.
In the embodiment, the document including the template chart is obtained, and different from the prior art, the document directly includes the template chart, and the template chart does not exist in the document in a link mode, so that frequent clicking by a user is not needed in the process of generating the customized chart, and the convenience of user operation is improved. The variable set can be obtained according to the identification information, a user does not need to actively obtain the variable set, and the style information of the elements is changed according to the initial elements corresponding to the elements in the template chart, so that the styles of the generated customized chart and the template chart are kept consistent. Based on the embodiment, the customized chart consistent with the style of the template chart can be quickly, quickly and conveniently generated.
In one possible embodiment, the generation module 1 is used for creating an Excel document;
creating a template chart in an Excel document;
creating a Word document or a PowerPoint document;
copying the template chart to a Word document or a PowerPoint document;
inserting identification information into a Word document or a PowerPoint document;
and saving the Word document or the PowerPoint document to obtain a template document.
In one possible implementation, the generation module 1 is used to create a Word document or a PowerPoint document; creating a template chart in a Word or PowerPoint document; acquiring a data table corresponding to the template chart; and inserting identification information into the data table, and storing the Word document or the PowerPoint document to obtain the template document.
In a possible implementation manner, the variable set obtaining module 4 is configured to obtain a variable set according to the identification information; acquiring a category series name and a value series name in a template chart from a bottom-layer storage file; acquiring a category series subset and a value series subset from the variable set according to the category series name; the inserting module 7 is used for inserting the elements of the series subset and the value series subset into the corresponding positions of the labels.
In a possible implementation manner, the variable set obtaining module 4 is configured to obtain a category series subset and a value series subset according to the identification information;
the inserting module 7 is further configured to insert the elements of the series subset and the value series subset into their corresponding tag positions.
In a possible embodiment, the style information modification module 6 is further configured to obtain an initial index of the initial element in the template chart; judging whether the initial index is the same as the set index of the element in the variable set; if not, acquiring a style text of the initial element in the bottom-layer storage file according to the initial index; and modifying the index in the style text into an aggregate index.
In one possible implementation, the set of variables is obtained based on the sequence number information.
Example 3
Fig. 10 shows a block diagram of an electronic device according to an embodiment of the present disclosure, where fig. 10 is a block diagram of the electronic device. The electronic device may include a processor 101, a communication interface 102, a memory 103, and at least one communication bus 104. Wherein the communication bus 104 is used for realizing direct connection communication of these components. In this embodiment, the communication interface 102 of the electronic device is used for performing signaling or data communication with other node devices. The processor 101 may be an integrated circuit chip having signal processing capabilities.
The Processor 101 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 101 may be any conventional processor or the like.
The Memory 103 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 103 stores computer readable instructions which, when executed by the processor 101, enable the electronic device to perform the steps involved in the above-described method embodiments.
Optionally, the electronic device may further include a memory controller, an input output unit.
The memory 103, the memory controller, the processor 101, the peripheral interface, and the input/output unit are electrically connected to each other directly or indirectly to implement data transmission or interaction. For example, these components may be electrically coupled to each other via one or more communication buses 104. The processor 101 is adapted to execute executable modules stored in the memory 103, such as software functional modules or computer programs comprised by the electronic device.
The input and output unit is used for providing a task for a user to create and start an optional time period or preset execution time for the task creation so as to realize the interaction between the user and the server. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 10 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 10 or have a different configuration than shown in fig. 10. The components shown in fig. 10 may be implemented in hardware, software, or a combination thereof.
An embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, when the computer program is executed by a processor, the method in the method embodiment is implemented, and details are not repeated here to avoid repetition.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method of generating a document having a custom chart, comprising:
generating a template document, wherein the template document comprises a template chart and identification information;
acquiring a bottom storage file corresponding to the template document;
acquiring the identification information in the bottom storage file;
acquiring a variable set according to the identification information;
acquiring the corresponding label positions of the elements in the variable set in the template chart;
changing the style information of the element according to the initial element corresponding to the element in the template chart;
and inserting the element into the position of the label.
2. The document generating method with a custom chart according to claim 1,
the step of generating a template document comprises:
creating an Excel document;
creating a template chart in the Excel document;
creating a Word document or a PowerPoint document;
copying the template chart to the Word document or the PowerPoint document;
inserting the identification information into the Word document or the PowerPoint document;
and storing the Word document or the PowerPoint document to obtain the template document.
3. The document generating method with a custom chart according to claim 1,
the step of generating a template document comprises:
creating a Word document or a PowerPoint document;
creating a template chart in the Word or the PowerPoint document;
acquiring a data table corresponding to the template chart;
and inserting the identification information into the data table, and storing the Word document or the PowerPoint document to obtain the template document.
4. The method of generating a document with a custom chart according to claim 2, wherein the step of obtaining a set of variables from the identification information comprises:
acquiring the variable set according to the identification information;
acquiring category series names in the template chart from the bottom-layer storage file;
acquiring a category series sub-set and a value series set in the variable set according to the category series name;
the step of inserting the element into the tag location comprises:
and inserting the elements of the series of subsets and the elements of the value series of subsets into the corresponding on-label positions.
5. The method of generating a document with a custom chart according to claim 3, wherein the step of obtaining a set of variables from the identification information comprises:
acquiring a category series subset and a value series subset according to the identification information;
the step of inserting the element into the tag location comprises:
and inserting the elements of the series of subsets and the elements of the value series of subsets into the corresponding positions of the tags.
6. A document generation method with a customized chart according to any one of claims 1-5, wherein the step of changing style information of the element according to the corresponding initial element of the element in the template chart comprises:
acquiring an initial index of the initial element in the template chart;
judging whether the initial index is the same as the set index of the element in the variable set or not;
if not, acquiring a style text of the initial element in the bottom-layer storage file according to the initial index;
and modifying the index in the style text into the set index.
7. The document generating method with a custom chart according to claim 4,
the template document is provided with a plurality of template charts;
the identification information comprises serial number information;
the step of obtaining the variable set according to the identification information includes:
and acquiring the variable set according to the sequence number information.
8. A document creation apparatus having a custom chart, comprising:
the generating module is used for generating a template document, and the template document comprises a template chart and identification information;
the bottom storage file acquisition module is used for acquiring a bottom storage file corresponding to the template document;
the identification information acquisition module is used for acquiring identification information in the bottom storage file;
the variable set acquisition module is used for acquiring a variable set according to the identification information;
the position of the located label is used for obtaining the position of the located label of the element in the variable set in the template chart;
the style information changing module is used for changing the style information of the label position according to the initial element corresponding to the element in the template;
and the inserting module is used for inserting the element into the position of the label.
9. An electronic device, comprising: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method of generating a custom chart according to any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the method of generating a custom chart according to any one of claims 1-7.
CN202111630001.0A 2021-12-28 2021-12-28 Document generation method and device with customized chart, electronic equipment and medium Pending CN114282499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111630001.0A CN114282499A (en) 2021-12-28 2021-12-28 Document generation method and device with customized chart, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111630001.0A CN114282499A (en) 2021-12-28 2021-12-28 Document generation method and device with customized chart, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN114282499A true CN114282499A (en) 2022-04-05

Family

ID=80877303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111630001.0A Pending CN114282499A (en) 2021-12-28 2021-12-28 Document generation method and device with customized chart, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114282499A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115618806A (en) * 2022-09-01 2023-01-17 睿智合创(北京)科技有限公司 PPT document processing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115618806A (en) * 2022-09-01 2023-01-17 睿智合创(北京)科技有限公司 PPT document processing method and device
CN115618806B (en) * 2022-09-01 2023-06-27 睿智合创(北京)科技有限公司 PPT document processing method and device

Similar Documents

Publication Publication Date Title
CA2669479C (en) Generating end-user presentations from structured data
US7707498B2 (en) Specific type content manager in an electronic document
US20130185622A1 (en) Methods and systems for handling annotations and using calculation of addresses in tree-based structures
US10657323B2 (en) Method of preparing documents in markup languages
CN110738037A (en) Method, apparatus, device and storage medium for automatically generating electronic form
US7720814B2 (en) Repopulating a database with document content
US20150067520A1 (en) System for generating a plurality of graphical reports from a data set
CN111208982B (en) ERP system rapid customization platform based on visual configuration mode
CN111159982B (en) Document editing method, device, electronic equipment and computer readable storage medium
CN110705237A (en) Automatic document generation method, data processing device, and storage medium
US8799256B2 (en) Incorporated web page content
CN112215923A (en) Picture generation method and device, electronic equipment and storage medium
CN114282499A (en) Document generation method and device with customized chart, electronic equipment and medium
JP5747698B2 (en) Requirements management support device
US11295062B1 (en) User configurable electronic medical records browser
JP7121363B2 (en) Version control method and version control system for large-scale electronic documents
US10789424B2 (en) System and method for multi-dimensional knowledge representation
US20170205989A1 (en) Graphical user interface for non-hierarchichal file system
CN114417789A (en) Data reference method and device, electronic equipment and storage medium
US11036729B2 (en) Document creation support system
JPWO2005098698A1 (en) Document processing device
Milosavljevic et al. XML schema of UNIMARC format variant and bibliographic record in BISIS software system
US11921797B2 (en) Computer service for indexing threaded comments with pagination support
US20200159400A1 (en) Graphical user interface for non-hierarchichal file system
US20200242301A1 (en) Technology platform having integrated content creation features

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination