An image processing device that generates, from an input image, an electronic document having a predetermined format defined for a spreadsheet software, the image processing device comprising: a region identification means configured to analyze the image and identify a table region; and a table structure analysis means configured to analyze a table included in the identified table region to create table structure information including information of cells of the table wherein information of cells of the table includes information of ruled lines that are line borders enclosing the cells, characterized in that the image processing device further comprises: a determination means configured to determine whether or not each of the ruled lines can be represented according to a specification of the predetermined format defined for the spreadsheet software; a processing means configured to create, for a first ruled line which is determined to be representable according to the specification of the predetermined format, information of the first ruled line represented according to the specification of the predetermined format; a vectorization means configured to create, for a second ruled line which is determined to be unrepresentable within the specification of the predetermined format, a vector line object of the second ruled line by performing vector conversion processing on the second ruled line; and an electronic document generation means configured to generate the electronic document having the predetermined format from the created table structure information, the created information of the first ruled line, and the created vector line object of the second ruled line. a region identification means configured to analyze the image and identify a table region; and a table structure analysis means configured to analyze a table included in the identified table region to create table structure information including information of cells of the table wherein information of cells of the table includes information of ruled lines that are line borders enclosing the cells, characterized in that the image processing device further comprises: a determination means configured to determine whether or not each of the ruled lines can be represented according to a specification of the predetermined format defined for the spreadsheet software; a processing means configured to create, for a first ruled line which is determined to be representable according to the specification of the predetermined format, information of the first ruled line represented according to the specification of the predetermined format; a vectorization means configured to create, for a second ruled line which is determined to be unrepresentable within the specification of the predetermined format, a vector line object of the second ruled line by performing vector conversion processing on the second ruled line; and an electronic document generation means configured to generate the electronic document having the predetermined format from the created table structure information, the created information of the first ruled line, and the created vector line object of the second ruled line. a determination means configured to determine whether or not each of the ruled lines can be represented according to a specification of the predetermined format defined for the spreadsheet software; a processing means configured to create, for a first ruled line which is determined to be representable according to the specification of the predetermined format, information of the first ruled line represented according to the specification of the predetermined format; a vectorization means configured to create, for a second ruled line which is determined to be unrepresentable within the specification of the predetermined format, a vector line object of the second ruled line by performing vector conversion processing on the second ruled line; and an electronic document generation means configured to generate the electronic document having the predetermined format from the created table structure information, the created information of the first ruled line, and the created vector line object of the second ruled line.