Pobierz dane z DuckDB plik do Excel
Otwórz bazę danych DuckDB w Excelu i odświeżaj ją, kiedy tylko chcesz. Bez sterownika ODBC, bez eksportowania do CSV, bez makr. Za pierwszym razem zajmie to około dziesięciu minut, a plan darmowy to obejmuje.
Co z tego wyjdzie?
Arkusz kalkulacyjny pokazujący na żywo wyniki zapytania SQL do pliku DuckDB, z przyciskiem pobierającym najnowsze wiersze po każdej zmianie danych. Na przykład:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | customer_id | imię | nazwisko | kraj | całkowity |
| 2 | 1042 | Maria | Álvarez | USA | 1,284.50 |
| 3 | 1043 | Daniel | Okafor | USA | 612.00 |
| 4 | 1047 | Priya | Nair | USA | 2,090.75 |
| 5 | 1051 | Tomasz | Góra | USA | 338.20 |
| 6 | 1056 | Lucía | Ferreira | USA | 1,455.00 |
| 7 | 1060 | Kenji | Sato | USA | 874.10 |
| 8 |
Bazy danych DuckDB to pojedyncze pliki, zwykle kończące się na .duckdbExcel nie może ich otworzyć samodzielnie, a standardowe obejście polega na zainstalowaniu sterownika ODBC i zmaganiu się z ciągami połączeń. Query Streams pomija ten problem: mały program pomocniczy odczytuje plik w miejscu, w którym się on znajduje, a dodatek do Excela pyta go o żądane wiersze. Nie muszą one znajdować się na tym samym komputerze. Plik może znajdować się na komputerze biurowym, a Ty możesz być w dowolnym miejscu: na laptopie w domu, komputerze kolegi z drugiego końca kraju lub w Excelu w internecie.
Czego będziesz potrzebować
Konto Query Streams
Plan darmowy wystarczy do tego poradnika. Zarejestruj się na my.querystreams.com.
The Agent on a computer that can open the file
Mały program, który działa w tle i odczytuje plik, gdy Excel o to poprosi. Krok 2 poniżej pokazuje, gdzie go znaleźć.
Twój plik DuckDB
Na przykład wiedzieć, gdzie to jest C:\Dane\sales.duckdb lub \\server\share\sales.duckdb. If it lives in OneDrive, Dropbox or Google Drive, make sure it is synced to the Agent’s computer.
Który komputer ma Agenta? The one where the file is, or one that can open it from a network share (see Reaching a file on a network share below). That computer needs to stay on. Excel może być wszędzie: Twój laptop w domu, komputer kolegi z drugiego końca kraju czy Excel w internecie. Niczego więcej nie trzeba instalować tam, gdzie działa Excel.
Podłącz w pięciu krokach
-
Utwórz swoje konto
Przejdź do my.querystreams.com i zarejestruj się. Wybierz Bezpłatny plan. To prawdziwy plan, a nie wersja próbna, obejmujący podłączenie pliku DuckDB i uruchamianie zapytań z programu Excel.
Install the Agent on a computer that can open the file



Zaloguj się, otwórz Pobierać, and install the Agent for your system on the computer where the file is, or on one that can open it from a network share. It takes a minute and starts on its own from then on.
Dlaczego mały program, a nie sterownik? The Agent is one install for Windows, Mac or Linux (about 85 MB on Windows, a little over 100 MB on Mac and Linux) that runs quietly in the background. It makes one outbound, encrypted connection to Query Streams, the same way a browser does, so you open no firewall port and set up no VPN. The file stays where it is, and the rows travel to wherever you are, across the internet if need be. The only thing on your side is the add-in.
Strona pobierania pokazuje Twój klucz dostępuWklej to do agenta, gdy o to poprosi i poczekaj, aż odznaka zostanie odczytana Połączono ze strumieniami zapytańTo jest jedyna rzecz, którą robisz na samym Agencie.
Pełne opisy przejść, jeśli ich potrzebujesz: Okna, Prochowiec, Linux.
-
Skieruj go na swój plik DuckDB
Wróć do przeglądarki i otwórz Agenci danych (pod Dane (w górnym menu). Twój agent jest tam wymieniony. Kliknij Dodaj złącze, wybierać DuckDBi wypełnij:
- Nazwa połączenia
- Jakąkolwiek nazwę, którą później rozpoznasz, np. Baza danych sprzedaży.
- Ścieżka pliku bazy danych
- Where the DuckDB file (.duckdb or .db) is: a path on the Agent’s computer, or a network path, like \\server\share\folder\sales.duckdb, never a mapped drive letter such as S:. Use Browse to pick it.
Kliknij Połączenie testowe. Kiedy to czyta Połączony, kliknij ZapiszPołączenie zostanie nawiązane z Twoim agentem w ciągu kilku sekund.
Test nieudany? Usually the path has a typo, or it uses a mapped drive letter such as S:, which the Agent cannot see. Open the folder, copy the path from the address bar, and paste it in again. For a file on another computer, see Reaching a file on a network share poniżej.
-
See your data in Query Builder Fakultatywny
You can look at your DuckDB file before Excel is involved at all. Open Kreator zapytań in the portal and pick the connection you just made. The Schemat tab lists your tables and columns, and clicking one puts its name in the editor, so you can write a query without remembering exact names. Click Bieg and the rows appear under Wyniki. Query Builder is on every plan, Free included.
On Business plans you can also ask Nova in plain English (“show me customers in the USA”) and it writes the SQL for you. When the query looks right, save it: from Personal Core up it shows in the add-in’s Saved Queries list, and on any plan you can copy the SQL into the next step.
-
Dodawanie strumieni zapytań do programu Excel
W programie Excel przejdź do Wstaw → Pobierz dodatki, wyszukaj Strumienie zapytańi kliknij Dodaj. Lub otwórz go bezpośrednio z Strumienie zapytań w Microsoft AppSourceNa wstążce pojawi się przycisk „Strumienie zapytań”. Zaloguj się na to samo konto.
Działa w programie Excel dla usługi Microsoft 365 w systemach Windows i Mac oraz w programie Excel w sieci Web.
-
Przyciągnij swój pierwszy stolik
Kliknij przycisk Zapytaj strumienie, wybierz Przesyłanie strumieniowe zapytaniai wybierz połączenie, które właśnie utworzyłeś.
Wpisz zapytanie, które chcesz uruchomić. To zapytanie pobiera kilka kolumn z zamówienia tabela:
Przykład · SQLWYBIERZ order_id, customer_name, order_total Z main.orders ZAMÓW WEDŁUG order_total OPIS LIMIT 100;
Pod Arkusz docelowy wybierać Utwórz nowy arkusz, a następnie naciśnij przycisk odtwarzania (strzałka ▶). Wiersze trafią do Excela w ciągu sekundy lub dwóch. Naciśnij go ponownie za każdym razem, gdy dane ulegną zmianie, a arkusz zostanie zaktualizowany.
Nie znasz SQL? Build it in Kreator zapytań first and paste it here, or pick it from Saved Queries if you saved it.
Reaching a file on a network share
The Agent opens files as a background service, not as you, so a file on another computer needs one extra step. Which step depends on the computer the Agent runs on.
If the test cannot get to the share, look for these words in its result: unreachable means the Agent’s computer got no answer from the server. On Linux or a Mac, not mounted means the share still has to be mounted, and that message includes the exact mount command for your server.
DuckDB file on a share? DuckDB allows one writer at a time, so the Agent cannot open a file that another program has open for writing; on a \\serwer\udział path the test says it is open for writing by another program. Close it there, or point the connector at a file nobody is writing to. Every query reads the file across the network, so a large file answers more slowly than it would from a local disk.
Test failed on a share?
A Windows Agent signs in to the file server itself, so its test result can also say:
| Wiadomość | Przyczyna | Naprawić |
|---|---|---|
| Access denied for the agent’s service account under the path, or Odmowa dostępu in the test result | The share lets in named people only, and the Agent’s own Windows account is not one of them. Or the login stored for that server may not read this share. | Kliknij Service identity under the path and store a login that can read the share. If one is stored already, ask whoever runs the server to give that account read access. |
| the credentials were refused | The server turned the stored login down: a typo, the wrong domain, or a password changed since it was saved. | Click the account name under the path and type the login again; for an account made on the server itself, leave Domain blank. were refused moments ago means the Agent waits a minute before it tries that same login again, so the account is not locked out; saving a corrected password tries again straight away. |
| Another connector on this agent already signs in to, lub Windows already holds a sign-in to | This Windows computer already signs in to that server as a different account, through another connector or another program. Windows allows one account per server. | Store the login the other connector uses, or change it on every connector that reads that server. After Windows already holds a sign-in, the rest of the message says which account it is and what to do. |
| This agent build cannot sign in to | The Agent is an older version that cannot use stored share logins. | Update the Agent, then test again. |
To wszystko. Twoje dane znajdują się w arkuszu i są aktualizowane jednym kliknięciem. Nic nie opuściło Twojej sieci poza wierszami, o które prosiłeś.
Dobre następne ruchy
- Zapisz zapytanie w portalu, dzięki czemu możesz go ponownie uruchomić jednym kliknięciem z poziomu programu Excel lub Arkuszy Google.
- Dodaj filtr np. zakres dat, dzięki czemu na to samo zapytanie można odpowiedzieć „w tym miesiącu” bez konieczności edycji.
- Udostępnij wyniki z kolegą. Widzą wiersze, a nie Twój plik i ścieżkę do niego.
Pytania, które zadają ludzie
Czy program Excel musi znajdować się na tym samym komputerze, co plik DuckDB?
No. Only the Agent has to be able to open your DuckDB file. Excel can be on any computer with an internet connection, including Excel on the web and Excel on a Mac. Sign in to the add-in with your account and your connections are there.
Czy mój plik bazy danych zostanie gdzieś przesłany?
No. The Agent reads the file where it sits and sends only the rows your query asks for. The file stays where it is.
Czy plik może znajdować się w usłudze OneDrive, Dropbox lub Google Drive?
Tak, pod warunkiem, że jest zsynchronizowany z komputerem, na którym działa Agent, aby Agent widział go jako zwykły plik lokalny. Skieruj połączenie na zsynchronizowaną kopię.
Czy plan darmowy naprawdę to obejmuje?
Tak. Darmowy plan to taki, który możesz zachować, a nie okres próbny, który wygasa. Sprawdź dokładnie, co obejmuje. strona z cenami.
Czy działa z programem Excel dla komputerów Mac?
Tak. Excel dla Microsoft 365 na komputerach Mac i w systemie Windows oraz Excel w sieci Web.
Powiązane przewodniki
Każdy przewodnik dla DuckDB
Nie jest to dokładnie to, czego szukasz?
- Masz folder z plikami Parquet zamiast pliku bazy danych DuckDB? Parquet Folder odczyta je wszystkie jako jedną tabelę → Parquet Folder
- Chcesz przeszukiwać same skoroszyty programu Excel? Folder programu Excel odczytuje folder skoroszytów jako tabele → Excel Folder
Setup trouble?
- Agent says the file or folder does not exist, or access is denied? Mapped drives, network shares, OneDrive and Linux home folders each need one fix → Where the Agent can read files from
- Agent shows Offline, or Test connection and Browse are greyed out? Check that the Agent is online → Is the Agent online?

