gemcap-be-common 1.4.57 → 1.4.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/helpers/excel.helper.js +11 -0
- package/helpers/excel.helper.ts +12 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/helpers/excel.helper.js
CHANGED
|
@@ -160,6 +160,17 @@ const convertDataToFileWithStyle = async (dataToConvert, options) => {
|
|
|
160
160
|
if (cell.t === 'n') {
|
|
161
161
|
excelCell.numFmt = cell.z || '#,##0.00';
|
|
162
162
|
}
|
|
163
|
+
if (cell.hyperlink) {
|
|
164
|
+
excelCell.value = {
|
|
165
|
+
text: cell.v?.toString() ?? '',
|
|
166
|
+
hyperlink: cell.hyperlink,
|
|
167
|
+
};
|
|
168
|
+
// (Необязательно) стиль как ссылка
|
|
169
|
+
excelCell.font = { color: { argb: '0563C1' }, underline: true };
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
excelCell.value = cell.v;
|
|
173
|
+
}
|
|
163
174
|
// STYLES
|
|
164
175
|
if (cell.s) {
|
|
165
176
|
if (cell.s.font) {
|
package/helpers/excel.helper.ts
CHANGED
|
@@ -189,6 +189,18 @@ export const convertDataToFileWithStyle = async (
|
|
|
189
189
|
excelCell.numFmt = cell.z || '#,##0.00';
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
if (cell.hyperlink) {
|
|
193
|
+
excelCell.value = {
|
|
194
|
+
text: cell.v?.toString() ?? '',
|
|
195
|
+
hyperlink: cell.hyperlink,
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// (Необязательно) стиль как ссылка
|
|
199
|
+
excelCell.font = { color: { argb: '0563C1' }, underline: true };
|
|
200
|
+
} else {
|
|
201
|
+
excelCell.value = cell.v;
|
|
202
|
+
}
|
|
203
|
+
|
|
192
204
|
// STYLES
|
|
193
205
|
if (cell.s) {
|
|
194
206
|
if (cell.s.font) {
|