WebQuery Türünden Dış Veri Bağlantısı ile Çalışmak

WebQuery türündeki Harici Veri Bağlantısı ile Çalışma

Aşağıdaki kod, WebQuery türündeki harici veri bağlantısıyla nasıl çalışılacağını göstermektedir. İndirebileceğiniz örnek excel dosyası kullanılmaktadır. Ayrıca bu kodun konsol çıktısını aşağıda görebilirsiniz.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
Workbook workbook = new Workbook(dataDir + "WebQuerySample.xlsx");
ExternalConnection connection = workbook.DataConnections[0];
if (connection is WebQueryConnection)
{
WebQueryConnection webQuery = (WebQueryConnection)connection;
Console.WriteLine("Web Query URL: " + webQuery.Url);
}

Konsol Çıkışı

Yukarıdaki kodun örnek excel dosyası‘nın konsol çıktısı aşağıda verilmiştir.

Web Query URL: https://docs.aspose.com/cells/net/