2017-09-16 16:34:45 +09:00
|
|
|
// hyperlink.cpp
|
|
|
|
|
2018-08-14 09:07:09 +09:00
|
|
|
// QXlsx
|
|
|
|
// MIT License
|
|
|
|
// https://github.com/j2doll/QXlsx
|
|
|
|
//
|
|
|
|
// QtXlsx
|
|
|
|
// https://github.com/dbzhang800/QtXlsxWriter
|
|
|
|
// http://qtxlsx.debao.me/
|
|
|
|
// MIT License
|
|
|
|
|
2017-09-16 12:21:23 +09:00
|
|
|
#include <QtCore>
|
|
|
|
#include "xlsxdocument.h"
|
|
|
|
|
2017-09-16 16:34:45 +09:00
|
|
|
int hyperlink()
|
2017-09-16 12:21:23 +09:00
|
|
|
{
|
|
|
|
//![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]
|
2017-09-23 11:12:59 +09:00
|
|
|
xlsx.saveAs("hyperlink1.xlsx");
|
2017-09-16 12:21:23 +09:00
|
|
|
//![2]
|
|
|
|
|
2017-09-23 11:12:59 +09:00
|
|
|
QXlsx::Document xlsx2("hyperlink1.xlsx");
|
|
|
|
xlsx2.saveAs("hyperlink2.xlsx");
|
2017-09-16 12:21:23 +09:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|