查询后删除了一些数据

时间:2019-06-13 08:27:35

标签: google-sheets-query

我有一个带有“ Floor”列的Google工作表https://docs.google.com/spreadsheets/d/1mUV9DpVJHC2UbyqOG49wUIRj3EflTlB9etJQFssRLvo/,它包含数字和字符,我想查询该列并删除所有空单元格,=unique(query(A:A,"SELECT A WHERE A IS NOT NULL ORDER BY A"))仅查询数字并且所有字符都已删除。

谁能建议我如何使用唯一和排序功能查询所有内容?

2 个答案:

答案 0 :(得分:0)

改为使用过滤器功能。 考虑到A列同时包含数字和字符。 在B2中,写:= filter(A2:A,isnumber(A2:A)) 让我知道您是否需要帮助!

答案 1 :(得分:0)

我从https://webapps.stackexchange.com/questions/101778/google-sheets-query-wont-display-cell-text-if-other-cells-have-numbers阅读了这篇文章,并提出了解决方案,希望这可以对其他人有所帮助。

using System;
using System.IO;

namespace FileWatcherExample
{
    class Program
    {
        static void Main(string[] args)
        {
            string path = @"c:\example";
            MonitorDirectory(path);
            Console.ReadKey();
        }

        private static void MonitorDirectory(string path)
        {
            FileSystemWatcher fileSystemWatcher = new FileSystemWatcher();
            fileSystemWatcher.Path = path;
            fileSystemWatcher.Deleted += (o,s) => Console.WriteLine("File deleted: {0}", e.Name);
            fileSystemWatcher.EnableRaisingEvents = true;
        }
    }
}

之所以使用TO_TEXT()是因为Google表格中的单个列中混合了数据类型,多数数据类型决定了用于查询目的的列的数据类型,因此我将其全部转换为文本格式。 参考:https://support.google.com/docs/answer/3094285?hl=en

UNIQUE用于过滤所有重复的值

关于ARRAYFORMULA()函数,我不知道为什么需要它,但是QUERY()将返回#VALUE!如果缺少ARRAYFORMULA()。

如果有人可以解释ARRAYFORMULA()和Col1引用的用法,请回答。

相关问题