mirror of
https://github.com/QtExcel/QXlsx.git
synced 2025-01-16 04:42:53 +08:00
37 lines
711 B
C++
37 lines
711 B
C++
// hyperlink.cpp
|
|
|
|
// QXlsx
|
|
// MIT License
|
|
// https://github.com/j2doll/QXlsx
|
|
//
|
|
// QtXlsx
|
|
// https://github.com/dbzhang800/QtXlsxWriter
|
|
// http://qtxlsx.debao.me/
|
|
// MIT License
|
|
|
|
#include <QtCore>
|
|
#include "xlsxdocument.h"
|
|
|
|
int hyperlink()
|
|
{
|
|
//![0]
|
|
QXlsx::Document xlsx;
|
|
//![0]
|
|
|
|
//![1]
|
|
xlsx.write("A1", "http://qt-project.org");
|
|
xlsx.write("A2", "http://qt-project.org/wiki#0f68b904e33d9ac04605aecc958bcf52");
|
|
xlsx.write("A3", "mailto:info@qt-project.org");
|
|
xlsx.write("A4", "file:///C:/User/test/abc.txt");
|
|
//![1]
|
|
|
|
//![2]
|
|
xlsx.saveAs("hyperlink1.xlsx");
|
|
//![2]
|
|
|
|
QXlsx::Document xlsx2("hyperlink1.xlsx");
|
|
xlsx2.saveAs("hyperlink2.xlsx");
|
|
|
|
return 0;
|
|
}
|